opj_decompress_fuzzer: remove checks regarding input dimensions (fixes #1079)

This commit is contained in:
Even Rouault 2019-06-15 09:55:16 +02:00
parent f4d6578359
commit 8db9d25dcf
No known key found for this signature in database
GPG Key ID: 33EBBFC47B3DD87D
1 changed files with 2 additions and 0 deletions

View File

@ -153,6 +153,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len)
OPJ_UINT32 width = psImage->x1 - psImage->x0; OPJ_UINT32 width = psImage->x1 - psImage->x0;
OPJ_UINT32 height = psImage->y1 - psImage->y0; OPJ_UINT32 height = psImage->y1 - psImage->y0;
#if 0
// Reject too big images since that will require allocating a lot of // Reject too big images since that will require allocating a lot of
// memory // memory
if (width != 0 && psImage->numcomps != 0 && if (width != 0 && psImage->numcomps != 0 &&
@ -180,6 +181,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len)
return 0; return 0;
} }
#endif
OPJ_UINT32 width_to_read = width; OPJ_UINT32 width_to_read = width;
if (width_to_read > 1024) { if (width_to_read > 1024) {