[vlc-commits] contrib: taglib: don't crash with strange files

Rafaël Carré git at videolan.org
Mon Jul 2 14:33:44 CEST 2012


vlc/vlc-2.0 | branch: master | Rafaël Carré <funman at videolan.org> | Mon Jul  2 00:40:05 2012 +0200| [40cb29d9047cd3569fc333c2129050b494cad8b0] | committer: Felix Paul Kühne

contrib: taglib: don't crash with strange files

Close #7036
Patch sent upstream
(cherry picked from commit c7f19291e969c9035c098b4aa4af9c52c8bc7aae)

Conflicts:

	contrib/src/taglib/rules.mak

Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=40cb29d9047cd3569fc333c2129050b494cad8b0
---

 contrib/src/taglib/7036.patch |   15 +++++++++++++++
 contrib/src/taglib/rules.mak  |    1 +
 2 files changed, 16 insertions(+)

diff --git a/contrib/src/taglib/7036.patch b/contrib/src/taglib/7036.patch
new file mode 100644
index 0000000..7c41dad
--- /dev/null
+++ b/contrib/src/taglib/7036.patch
@@ -0,0 +1,15 @@
+diff --git a/taglib/mpeg/id3v2/id3v2tag.cpp b/taglib/mpeg/id3v2/id3v2tag.cpp
+index c6fe7b7..ebb1969 100644
+--- a/taglib/mpeg/id3v2/id3v2tag.cpp
++++ b/taglib/mpeg/id3v2/id3v2tag.cpp
+@@ -652,7 +652,9 @@ void ID3v2::Tag::parse(const ByteVector &origData)
+       return;
+     }
+ 
+-    Frame *frame = d->factory->createFrame(data.mid(frameDataPosition),
++    Frame *frame = NULL;
++    if (d->factory)
++        frame = d->factory->createFrame(data.mid(frameDataPosition),
+                                            &d->header);
+ 
+     if(!frame)
diff --git a/contrib/src/taglib/rules.mak b/contrib/src/taglib/rules.mak
index 79ea3ff..0ca8242 100644
--- a/contrib/src/taglib/rules.mak
+++ b/contrib/src/taglib/rules.mak
@@ -13,6 +13,7 @@ $(TARBALLS)/taglib-$(TAGLIB_VERSION).tar.gz:
 taglib: taglib-$(TAGLIB_VERSION).tar.gz .sum-taglib
 	$(UNPACK)
 	$(APPLY) $(SRC)/taglib/taglib-static.patch
+	$(APPLY) $(SRC)/taglib/7036.patch
 ifdef HAVE_WIN32
 	$(APPLY) $(SRC)/taglib/taglib-win32.patch
 endif



More information about the vlc-commits mailing list