[gimp] Bug 790853 - (CVE-2017-17787) heap overread in psp importer.
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 790853 - (CVE-2017-17787) heap overread in psp importer.
- Date: Thu, 21 Dec 2017 11:52:12 +0000 (UTC)
commit eb2980683e6472aff35a3117587c4f814515c74d
Author: Jehan <jehan girinstud io>
Date: Thu Dec 21 12:49:41 2017 +0100
Bug 790853 - (CVE-2017-17787) heap overread in psp importer.
As any external data, we have to check that strings being read at fixed
length are properly nul-terminated.
plug-ins/common/file-psp.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/common/file-psp.c b/plug-ins/common/file-psp.c
index c25bece..8e0517c 100644
--- a/plug-ins/common/file-psp.c
+++ b/plug-ins/common/file-psp.c
@@ -893,6 +893,12 @@ read_creator_block (FILE *f,
g_free (string);
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_TITLE:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]