aboutsummaryrefslogtreecommitdiffstats
path: root/main/taglib/CVE-2017-12678.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/taglib/CVE-2017-12678.patch')
-rw-r--r--main/taglib/CVE-2017-12678.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/main/taglib/CVE-2017-12678.patch b/main/taglib/CVE-2017-12678.patch
new file mode 100644
index 0000000000..6291ff0894
--- /dev/null
+++ b/main/taglib/CVE-2017-12678.patch
@@ -0,0 +1,18 @@
+Index: b/taglib/mpeg/id3v2/id3v2framefactory.cpp
+===================================================================
+--- a/taglib/mpeg/id3v2/id3v2framefactory.cpp
++++ b/taglib/mpeg/id3v2/id3v2framefactory.cpp
+@@ -334,10 +334,11 @@ void FrameFactory::rebuildAggregateFrame
+ tag->frameList("TDAT").size() == 1)
+ {
+ TextIdentificationFrame *tdrc =
+- static_cast<TextIdentificationFrame *>(tag->frameList("TDRC").front());
++ dynamic_cast<TextIdentificationFrame *>(tag->frameList("TDRC").front());
+ UnknownFrame *tdat = static_cast<UnknownFrame *>(tag->frameList("TDAT").front());
+
+- if(tdrc->fieldList().size() == 1 &&
++ if(tdrc &&
++ tdrc->fieldList().size() == 1 &&
+ tdrc->fieldList().front().size() == 4 &&
+ tdat->data().size() >= 5)
+ {