summaryrefslogtreecommitdiffstats
path: root/main/tiff/CVE-2012-4447.patch
blob: 29271ee57c625d8699039ffe6c4c4571551e5be4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
Index: tiff-3.9.4/libtiff/tif_pixarlog.c
===================================================================
--- tiff-3.9.4.orig/libtiff/tif_pixarlog.c	2010-06-08 14:50:42.000000000 -0400
+++ tiff-3.9.4/libtiff/tif_pixarlog.c	2012-10-05 16:51:49.201609547 -0400
@@ -663,7 +663,7 @@
 				      td->td_rowsperstrip), sizeof(uint16));
 	if (tbuf_size == 0)
 		return (0);
-	sp->tbuf = (uint16 *) _TIFFmalloc(tbuf_size);
+	sp->tbuf = (uint16 *) _TIFFmalloc(tbuf_size+sizeof(uint16)*sp->stride);
 	if (sp->tbuf == NULL)
 		return (0);
 	if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN)