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

Rafaël Carré git at videolan.org
Mon Jul 2 00:43:41 CEST 2012


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Mon Jul  2 00:40:05 2012 +0200| [c7f19291e969c9035c098b4aa4af9c52c8bc7aae] | committer: Rafaël Carré

contrib: taglib: don't crash with strange files

Close #7036
Patch sent upstream

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

 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 a58bf25..c3ccfb8 100644
--- a/contrib/src/taglib/rules.mak
+++ b/contrib/src/taglib/rules.mak
@@ -14,6 +14,7 @@ taglib: taglib-$(TAGLIB_VERSION).tar.gz .sum-taglib
 	$(UNPACK)
 	$(APPLY) $(SRC)/taglib/taglib-static.patch
 	$(APPLY) $(SRC)/taglib/no-ansi.patch
+	$(APPLY) $(SRC)/taglib/7036.patch
 ifdef HAVE_WIN32
 	$(APPLY) $(SRC)/taglib/taglib-win32.patch
 endif



More information about the vlc-commits mailing list