Chromium Code Reviews| Index: testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc |
| diff --git a/testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc b/testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc |
| index 8599f4b0c69b58a99f28bfb802221a8dedf90575..ca9b0427bef2ce2f16605947f5ddeb01e37f611f 100644 |
| --- a/testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc |
| +++ b/testing/libfuzzer/fuzzers/libpng_read_fuzzer.cc |
| @@ -92,7 +92,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
| } |
| // This is going to be too slow. |
| - if (height > 100000000 / width) |
| + if (width && height > 100000000 / width) |
|
aizatsky
2016/03/18 17:18:18
Is this written to prevent overflow? width * heigh
mmoroz
2016/03/21 09:07:37
Yes, this is for overflow prevention (from here: h
|
| return 0; |
| int passes = png_set_interlace_handling(png_ptr); |