Fax3PreDecode(): reset curruns and refruns state variables
to avoid out-of-bounds write triggered by GDAL when repeatedly reading a corrupt strip. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25493
This commit is contained in:
parent
1373f8dacb
commit
7b840002c1
@ -161,7 +161,9 @@ Fax3PreDecode(TIFF* tif, uint16 s)
|
||||
*/
|
||||
sp->bitmap =
|
||||
TIFFGetBitRevTable(tif->tif_dir.td_fillorder != FILLORDER_LSB2MSB);
|
||||
sp->curruns = sp->runs;
|
||||
if (sp->refruns) { /* init reference line to white */
|
||||
sp->refruns = sp->runs + sp->nruns;
|
||||
sp->refruns[0] = (uint32) sp->b.rowpixels;
|
||||
sp->refruns[1] = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user