tif_fax3.h: return error when a buffer overflow occurs. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25552 and https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25849
This commit is contained in:
parent
57d487aa1c
commit
c8f0a16f4a
@ -240,6 +240,11 @@ static const char* StateNames[] = {
|
||||
* current row and reset decoding state.
|
||||
*/
|
||||
#define SETVALUE(x) do { \
|
||||
if (pa >= thisrun + sp->nruns) { \
|
||||
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); \
|
||||
return (-1); \
|
||||
} \
|
||||
*pa++ = RunLength + (x); \
|
||||
a0 += (x); \
|
||||
RunLength = 0; \
|
||||
|
Loading…
Reference in New Issue
Block a user