Commit 5a895c4e authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

contrib: Fix libmatroska ebml crash

This fixes the matroska crash in at least our Windows and Linux version,
until a new libebml is released. Laurent Aimar had mostly worked around these in
[ce718de2] but FindNextElement was still vulnerable in

Tested on a matroska download with gaps. Many thanks to Laurent
(cherry picked from commit 6b7d5713)
parent b8cc196c
......@@ -948,7 +948,6 @@ libebml-$(LIBEBML_VERSION).tar.bz2:
libebml: libebml-$(LIBEBML_VERSION).tar.bz2
$(EXTRACT_BZ2)
#endif
ifdef HAVE_WIN32
(cd $@; patch -p0 < ../Patches/libebml-svn-win32.patch)
endif
......@@ -987,7 +986,7 @@ libmatroska-$(LIBMATROSKA_VERSION).tar.bz2:
libmatroska: libmatroska-$(LIBMATROSKA_VERSION).tar.bz2
$(EXTRACT_BZ2)
#endif
patch -p0 < ./Patches/libmatroska-kaxblock.patch
ifdef HAVE_WIN32
(cd $@; patch -p0 < ../Patches/libmatroska-win32.patch)
endif
......
diff -ruN libmatroska-0.8.1/matroska/KaxBlock.h libmatroska/matroska/KaxBlock.h
--- libmatroska-0.8.1/matroska/KaxBlock.h 2007-01-14 18:20:35.000000000 +0100
+++ libmatroska/matroska/KaxBlock.h 2008-09-23 23:05:55.000000000 +0200
@@ -367,6 +367,7 @@
public:
KaxBlockVirtual() :ParentCluster(NULL) {Data = DataBlock; Size = countof(DataBlock);}
KaxBlockVirtual(const KaxBlockVirtual & ElementToClone);
+ ~KaxBlockVirtual() { if( Data == DataBlock ) SetBuffer( NULL, 0 ); };
static EbmlElement & Create() {return *(new KaxBlockVirtual);}
const EbmlCallbacks & Generic() const {return ClassInfos;}
static const EbmlCallbacks ClassInfos;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment