Add CVE-2018-20760.patch
authorReinhard Tartler <siretart@tauware.de>
Fri, 15 Feb 2019 11:37:15 +0000 (06:37 -0500)
committerReinhard Tartler <siretart@tauware.de>
Fri, 15 Feb 2019 11:37:15 +0000 (06:37 -0500)
debian/patches/CVE-2018-20760.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/CVE-2018-20760.patch b/debian/patches/CVE-2018-20760.patch
new file mode 100644 (file)
index 0000000..b112264
--- /dev/null
@@ -0,0 +1,18 @@
+commit 4c1360818fc8948e9307059fba4dc47ba8ad255d
+Author: Aurelien David <aurelien.david@telecom-paristech.fr>
+Date:   Thu Dec 13 14:39:21 2018 +0100
+Description: CVE-2018-20760
+
+    check error code on call to gf_utf8_wcstombs (#1177)
+
+--- a/src/media_tools/text_import.c
++++ b/src/media_tools/text_import.c
+@@ -292,6 +292,8 @@ char *gf_text_get_utf8_line(char *szLine
+       }
+       sptr = (u16 *)szLine;
+       i = (u32) gf_utf8_wcstombs(szLineConv, 1024, (const unsigned short **) &sptr);
++      if (i >= (u32)ARRAY_LENGTH(szLineConv))
++              return NULL;
+       szLineConv[i] = 0;
+       strcpy(szLine, szLineConv);
+       /*this is ugly indeed: since input is UTF16-LE, there are many chances the fgets never reads the \0 after a \n*/
index 5dadc4b5cbcf9ba82260ec989d778f9ca53e56ac..4b5131a2e749263ca16f8a039b181ce7273fc778 100644 (file)
@@ -9,3 +9,4 @@ fix_makefile_install.patch
 CVE-2018-7752.patch
 CVE-2018-20762.patch
 CVE-2018-20763.patch
+CVE-2018-20760.patch