Compare commits

...

11 Commits

Author SHA1 Message Date
Moritz Bunkus
6d8e423ef0 KaxVersion.cpp: always set KaxCodeDate to "Unknown"
This is done in order to enable deterministic builds while still keeping
the library API and ABI compatible. Patch by Ed Schouten <ed@nuxi.nl>.
2015-11-21 10:58:21 +01:00
Moritz Bunkus
2619e001cb Bump version number, add release message 2015-10-20 15:07:17 +02:00
Moritz Bunkus
76212be904 build system: require libebml >= 1.3.3 due to fixes for invalid memory access 2015-10-20 15:06:40 +02:00
Moritz Bunkus
0a2d3e3644 KaxBlockInternal: check EBML lace sizes against available buffer space 2015-10-20 12:00:53 +02:00
Moritz Bunkus
4934049696 Bump version number, add release message 2015-10-17 16:02:54 +02:00
Moritz Bunkus
db5d627b5b Merge pull request #7 from DanWin/master
Some optimizations
2015-05-02 11:07:27 +02:00
Daniel Winzen
e97e1a3897 Fix memory leak 2015-05-02 10:38:11 +02:00
Daniel Winzen
bab4d91a78 Some optimizations 2015-05-02 10:37:45 +02:00
Jan Engelhardt
9466bf5f2b build: libmatroska needs to link against libebml
The library uses symbols from libebml, and so should link to it.
2015-02-02 15:12:54 +01:00
Moritz Bunkus
81edf95a02 Merge pull request #5 from phonohawk/fix-libmatroska-linkage-failure
Fix linkage failure of libmatroska due to missing -lebml flag
2015-01-22 15:26:36 +01:00
PHO
b3de2dd981 Fix linkage failure of libmatroska due to missing -lebml flag
Without this change the following linkage error occurs:

    /bin/sh ./libtool  --tag=CXX   --mode=link g++ -Wall -Wextra \
      -Wno-unknown-pragmas -Wshadow -I/usr/pkg/include   -pipe -O2 \
      -I/usr/pkg/include -version-info 6:0:0 -no-undefined -L/usr/pkg/lib \
      -o libmatroska.la -rpath /usr/pkg/lib src/FileKax.lo \
      src/KaxAttached.lo src/KaxAttachments.lo src/KaxBlock.lo \
      src/KaxBlockData.lo src/KaxCluster.lo src/KaxContexts.lo \
      src/KaxCues.lo src/KaxCuesData.lo src/KaxInfoData.lo \
      src/KaxSeekHead.lo src/KaxSegment.lo src/KaxSemantic.lo \
      src/KaxTracks.lo src/KaxVersion.lo
    Undefined symbols:
      "libebml::EbmlUnicodeString::EbmlUnicodeString()", referenced from:
          libmatroska::KaxSegmentFilename::KaxSegmentFilename()in KaxSemantic.o
          libmatroska::KaxPrevFilename::KaxPrevFilename()in KaxSemantic.o
          libmatroska::KaxNextFilename::KaxNextFilename()in KaxSemantic.o
          ...
2015-01-22 22:29:26 +09:00
8 changed files with 50 additions and 9 deletions

View File

@ -1,3 +1,34 @@
2015-11-21 Moritz Bunkus <moritz@bunkus.org>
* KaxVersion.cpp: in order to enable deterministic builds the
KaxCodeDate variable has been set to "Unknown" instead of the date
and time of compilation. Patch by Ed Schouten <ed@nuxi.nl>.
2015-10-20 Moritz Bunkus <moritz@bunkus.org>
* Released v1.4.4.
* KaxInternalBlock::ReadData(): Fixed an invalid memory
access. When reading a block group or a simple block that uses
EBML lacing the frame sizes indicated in the lacing weren't
checked against the available number of bytes. If the indicated
frame size was bigger than the whole block's size the parser would
read beyond the end of the buffer resulting in a heap information
leak.
2015-10-17 Moritz Bunkus <moritz@bunkus.org>
* Released v1.4.3.
2015-05-02 Daniel Winzen <d@winzen4.de>
* all: a couple of optimizations in the main library and a memory
leak fix in the tests
2015-02-01 Jan Engelhardt <jengelh@inai.de>
* build system: fix linking against libEBML
2015-01-04 Moritz Bunkus <moritz@bunkus.org>
* Released v1.4.2.

View File

@ -27,6 +27,7 @@ libmatroska_la_SOURCES = \
src/KaxTracks.cpp \
src/KaxVersion.cpp
libmatroska_la_LDFLAGS = -version-info 6:0:0 -no-undefined
libmatroska_la_LIBADD = $(EBML_LIBS)
nobase_include_HEADERS = \
matroska/c/libmatroska.h \

View File

@ -1,4 +1,4 @@
AC_INIT([libmatroska], [1.4.2])
AC_INIT([libmatroska], [1.4.4])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
@ -9,6 +9,6 @@ AC_ARG_ENABLE([debug],
AS_HELP_STRING([--enable-debug], [Add -g -DDEBUG to compile flags]),
[enable_debug="$withval"], [enable_debug=no])
AM_CONDITIONAL([ENABLE_DEBUG], [test "$enable_debug" = yes])
PKG_CHECK_MODULES([EBML],[libebml >= 1.3.1])
PKG_CHECK_MODULES([EBML],[libebml >= 1.3.3])
AC_CONFIG_FILES([Makefile libmatroska.pc])
AC_OUTPUT

View File

@ -40,7 +40,7 @@
START_LIBMATROSKA_NAMESPACE
#define LIBMATROSKA_VERSION 0x010402
#define LIBMATROSKA_VERSION 0x010404
extern const std::string KaxCodeVersion;
extern const std::string KaxCodeDate;

View File

@ -280,7 +280,7 @@ inline bool FileMatroska::IsMyTrack(const Track * aTrack) const
if (aTrack == 0)
throw 0;
for (std::vector<Track*>::const_iterator i = myTracks.begin(); i != myTracks.end(); i ++) {
for (std::vector<Track*>::const_iterator i = myTracks.begin(); i != myTracks.end(); ++i) {
if (*i == aTrack)
break;
}
@ -296,7 +296,7 @@ void FileMatroska::SelectReadingTrack(Track * aTrack, bool select)
if (IsMyTrack(aTrack)) {
// here we have the right track
// check if it's not already selected
for (std::vector<uint8>::iterator j = mySelectedTracks.begin(); j != mySelectedTracks.end(); j ++) {
for (std::vector<uint8>::iterator j = mySelectedTracks.begin(); j != mySelectedTracks.end(); ++j) {
if (*j == aTrack->TrackNumber())
break;
}
@ -314,7 +314,7 @@ inline bool FileMatroska::IsReadingTrack(const uint8 aTrackNumber) const
{
for (std::vector<uint8>::const_iterator trackIdx = mySelectedTracks.begin();
trackIdx != mySelectedTracks.end() && *trackIdx < aTrackNumber;
trackIdx++) {}
++trackIdx) {}
if (trackIdx == mySelectedTracks.end())
return false;

View File

@ -89,7 +89,7 @@ KaxInternalBlock::KaxInternalBlock(const KaxInternalBlock & ElementToClone)
std::vector<DataBuffer *>::iterator myItr = myBuffers.begin();
while (Itr != ElementToClone.myBuffers.end()) {
*myItr = (*Itr)->Clone();
Itr++; myItr++;
++Itr; ++myItr;
}
}
@ -529,6 +529,8 @@ filepos_t KaxInternalBlock::ReadData(IOCallback & input, ScopeMode ReadFully)
case LACING_EBML:
SizeRead = LastBufferSize;
FrameSize = ReadCodedSizeValue(BufferStart + Mem.GetPosition(), SizeRead, SizeUnknown);
if (!FrameSize || (static_cast<uint32>(FrameSize + SizeRead) > LastBufferSize))
throw SafeReadIOCallback::EndOfStreamX(SizeRead);
SizeList[0] = FrameSize;
Mem.Skip(SizeRead);
LastBufferSize -= FrameSize + SizeRead;
@ -537,6 +539,8 @@ filepos_t KaxInternalBlock::ReadData(IOCallback & input, ScopeMode ReadFully)
// get the size of the frame
SizeRead = LastBufferSize;
FrameSize += ReadCodedSizeSignedValue(BufferStart + Mem.GetPosition(), SizeRead, SizeUnknown);
if (!FrameSize || (static_cast<uint32>(FrameSize + SizeRead) > LastBufferSize))
throw SafeReadIOCallback::EndOfStreamX(SizeRead);
SizeList[Index] = FrameSize;
Mem.Skip(SizeRead);
LastBufferSize -= FrameSize + SizeRead;

View File

@ -37,7 +37,11 @@
START_LIBMATROSKA_NAMESPACE
const std::string KaxCodeVersion = "1.4.2";
const std::string KaxCodeDate = __TIMESTAMP__;
const std::string KaxCodeVersion = "1.4.4";
// Up to version 1.4.4 this library exported a build date string. As
// this made the build non-reproducible, replace it by a placeholder to
// remain binary compatible.
const std::string KaxCodeDate = "Unknown";
END_LIBMATROSKA_NAMESPACE

View File

@ -822,6 +822,7 @@ int main(int argc, char **argv)
}
else cout << "received a frame from an unwanted track" << endl;
}
delete[] Tracks;
#endif // OLD
}
catch (exception & Ex)