X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/615a9936a47445caccdabbf68263af3432f1f109..f009156727ddfbca08197b63d0fbee00df4078f5:/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",