[gimp] Bug 701120: Opening fuzzed .pnm-file causes stack buffer overflow
- From: Massimo Valentini <mvalentini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 701120: Opening fuzzed .pnm-file causes stack buffer overflow
- Date: Sat, 1 Jun 2013 15:33:00 +0000 (UTC)
commit ac98dd47511c422e170bc2aac934dd47ae4d1d3f
Author: Massimo Valentini <mvalentini src gnome org>
Date: Sat Jun 1 17:30:43 2013 +0200
Bug 701120: Opening fuzzed .pnm-file causes stack buffer overflow
increase BUFLEN to avoid appending the nul terminator '\0'
past the end of 'buf'
plug-ins/common/file-pnm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/common/file-pnm.c b/plug-ins/common/file-pnm.c
index feab67a..516c1dc 100644
--- a/plug-ins/common/file-pnm.c
+++ b/plug-ins/common/file-pnm.c
@@ -482,7 +482,7 @@ load_image (const gchar *filename,
gint32 volatile image_ID = -1;
gint32 layer_ID;
int fd; /* File descriptor */
- char buf[BUFLEN]; /* buffer for random things like scanning */
+ char buf[BUFLEN + 4]; /* buffer for random things like scanning */
PNMInfo *pnminfo;
PNMScanner * volatile scan;
int ctr;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]