gimp/gimp-2.8.22-CVE-2017-17787.patch

17 lines
660 B
Diff
Raw Normal View History

diff -urNp old/plug-ins/common/file-psp.c new/plug-ins/common/file-psp.c
--- old/plug-ins/common/file-psp.c 2018-01-04 11:58:46.928253797 +0100
+++ new/plug-ins/common/file-psp.c 2018-01-04 12:03:42.141874067 +0100
@@ -913,6 +913,12 @@ read_creator_block (FILE *f,
g_message ("Error reading creator keyword data");
return -1;
}
+ if (string[length - 1] != '\0')
+ {
+ g_message ("Creator keyword data not nul-terminated");
+ g_free (string);
+ return -1;
+ }
switch (keyword)
{
case PSP_CRTR_FLD_CRT_DATE: