blob: 2543b89eb01a72ec3f22395c41eac449deb8f26a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
diff --git a/third_party/libtiff/tif_read.c b/third_party/libtiff/tif_read.c
index 5cb419bd4..548b1f5ea 100644
--- a/third_party/libtiff/tif_read.c
+++ b/third_party/libtiff/tif_read.c
@@ -936,6 +936,9 @@ TIFFReadBufferSetup(TIFF* tif, void* bp, tmsize_t size)
return (0);
}
tif->tif_rawdata = (uint8*) _TIFFmalloc(tif->tif_rawdatasize);
+ if (tif->tif_rawdata)
+ memset(tif->tif_rawdata, 0, tif->tif_rawdatasize);
+
tif->tif_flags |= TIFF_MYBUFFER;
}
if (tif->tif_rawdata == NULL) {
|