[gimp] 790783 - buffer overread in XCF parser if version field...
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] 790783 - buffer overread in XCF parser if version field...
- Date: Sun, 26 Nov 2017 23:49:36 +0000 (UTC)
commit 702c4227e8b6169f781e4bb5ae4b5733f51ab126
Author: Hanno Boeck <hanno hboeck de>
Date: Mon Nov 27 00:37:29 2017 +0100
790783 - buffer overread in XCF parser if version field...
...has no null terminator
Check for the presence of '\0' before using atoi() on the version
string. Patch slightly modified (mitch).
app/xcf/xcf.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/app/xcf/xcf.c b/app/xcf/xcf.c
index 620c92d..7cc6944 100644
--- a/app/xcf/xcf.c
+++ b/app/xcf/xcf.c
@@ -293,7 +293,8 @@ xcf_load_stream (Gimp *gimp,
{
info.file_version = 0;
}
- else if (id[9] == 'v')
+ else if (id[9] == 'v' &&
+ id[13] == '\0')
{
info.file_version = atoi (id + 10);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]