[vlc-devel] commit: contrib: Fix libmatroska ebml crash (Derk-Jan Hartman )
git version control
git at videolan.org
Tue Sep 23 23:33:42 CEST 2008
vlc | branch: 0.9-bugfix | Derk-Jan Hartman <hartman at videolan.org> | Tue Sep 23 23:32:10 2008 +0200| [5a895c4eb623567fd0d65b823c12455c11fb397d] | committer: 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
[ce718de21f000a5dda416960a2b7dffdacabd9a2] but FindNextElement was still vulnerable in
Tested on a matroska download with gaps. Many thanks to Laurent
(cherry picked from commit 6b7d5713b280eb9e6f199eae989e61b5054fb3cc)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5a895c4eb623567fd0d65b823c12455c11fb397d
---
extras/contrib/src/Makefile | 3 +--
.../contrib/src/Patches/libmatroska-kaxblock.patch | 11 +++++++++++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/extras/contrib/src/Makefile b/extras/contrib/src/Makefile
index 7e7b7c5..09e2902 100644
--- a/extras/contrib/src/Makefile
+++ b/extras/contrib/src/Makefile
@@ -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 --git a/extras/contrib/src/Patches/libmatroska-kaxblock.patch b/extras/contrib/src/Patches/libmatroska-kaxblock.patch
new file mode 100644
index 0000000..e6f0d58
--- /dev/null
+++ b/extras/contrib/src/Patches/libmatroska-kaxblock.patch
@@ -0,0 +1,11 @@
+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;
More information about the vlc-devel
mailing list