Skip to content
Myr

fuzz: fix error handling

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Randy · committed by Randy · parent af516b9 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • tests:+1 added−1 removed

1 file+1 added−1 removed

modified:tests/stb_png_read_fuzzer.cpp+1 added-1 removed
4 unmodified lines
5extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)6{7 int x, y, channels;89 if(stbi_info_from_memory(data, size, &x, &y, &channels)) return 0;9 if(!stbi_info_from_memory(data, size, &x, &y, &channels)) return 0;1011 /* exit if the image is larger than ~80MB */12 if(y && x > (80000000 / 4) / y) return 0;13
6 unmodified lines