tif_fax3: quit Fax3Decode2D() when a buffer overflow occurs

fixes #186
This commit is contained in:
Thomas Bernard 2020-03-26 23:08:28 +01:00
parent ed881da0db
commit f1e9078f92
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C

View File

@ -390,8 +390,8 @@ done1d: \
if (pa >= thisrun + sp->nruns) { \ if (pa >= thisrun + sp->nruns) { \
TIFFErrorExt(tif->tif_clientdata, module, "Buffer overflow at line %u of %s %u", \ TIFFErrorExt(tif->tif_clientdata, module, "Buffer overflow at line %u of %s %u", \
sp->line, isTiled(tif) ? "tile" : "strip", isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip); \ sp->line, isTiled(tif) ? "tile" : "strip", isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip); \
break; \ return (-1); \
} \ } \
LOOKUP8(7, TIFFFaxMainTable, eof2d); \ LOOKUP8(7, TIFFFaxMainTable, eof2d); \
switch (TabEnt->State) { \ switch (TabEnt->State) { \
case S_Pass: \ case S_Pass: \