X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/615a9936a47445caccdabbf68263af3432f1f109..991420e6df6aaf452a0d27851d437c306a31c865:/src/tiff/tif_fax3.c diff --git a/src/tiff/tif_fax3.c b/src/tiff/tif_fax3.c index d10ee1a254..8f100d87aa 100644 --- a/src/tiff/tif_fax3.c +++ b/src/tiff/tif_fax3.c @@ -499,7 +499,8 @@ Fax3SetupState(TIFF* tif) uint32 nruns = needsRefLine ? 2*TIFFroundup(rowpixels,32) : rowpixels; - dsp->runs = (uint32*) _TIFFmalloc(nruns*sizeof (uint16)); + dsp->runs = (uint32*) _TIFFmalloc((2*nruns+3)*sizeof (uint32)); + if (dsp->runs == NULL) { TIFFError("Fax3SetupState", "%s: No space for Group 3/4 run arrays",