Compare commits

...

4 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
5 changed files with 31 additions and 5 deletions

View File

@ -1,3 +1,21 @@
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.

View File

@ -1,4 +1,4 @@
AC_INIT([libmatroska], [1.4.3])
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

@ -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.3";
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