From 06374082843275af71e1ccc4ca28e13fe3e51ed7 Mon Sep 17 00:00:00 2001 From: Randy Date: Tue, 12 Mar 2019 00:59:20 +0100 Subject: [PATCH] fuzz: fix error handling --- tests/stb_png_read_fuzzer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/stb_png_read_fuzzer.cpp b/tests/stb_png_read_fuzzer.cpp index 613eeb8..0e14e1b 100644 --- a/tests/stb_png_read_fuzzer.cpp +++ b/tests/stb_png_read_fuzzer.cpp @@ -6,7 +6,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 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 */ if(y && x > (80000000 / 4) / y) return 0;