fuzz: fix error handling
This commit is contained in:
parent
af516b99ff
commit
0637408284
@ -6,7 +6,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
|||||||
{
|
{
|
||||||
int x, y, channels;
|
int x, y, channels;
|
||||||
|
|
||||||
if(stbi_info_from_memory(data, size, &x, &y, &channels)) return 0;
|
if(!stbi_info_from_memory(data, size, &x, &y, &channels)) return 0;
|
||||||
|
|
||||||
/* exit if the image is larger than ~80MB */
|
/* exit if the image is larger than ~80MB */
|
||||||
if(y && x > (80000000 / 4) / y) return 0;
|
if(y && x > (80000000 / 4) / y) return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user