diff --git a/fuzz/compress.cc b/fuzz/compress.cc index 6bf657e3..539932f1 100644 --- a/fuzz/compress.cc +++ b/fuzz/compress.cc @@ -88,9 +88,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) if (ti != 2) flags |= TJFLAG_NOREALLOC; - /* tjLoadImage() ignores 0-pixel images and images larger than 1 Megapixel - when FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION is defined (yes, that's - a dirty hack), so we don't need to check the width and height here. */ + /* tjLoadImage() refuses to load images larger than 1 Megapixel when + FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION is defined (yes, that's a dirty + hack), so we don't need to check the width and height here. */ if ((srcBuf = tjLoadImage(filename, &width, 1, &height, &pf, flags)) == NULL) continue; diff --git a/fuzz/compress_yuv.cc b/fuzz/compress_yuv.cc index 6269d427..021d6615 100644 --- a/fuzz/compress_yuv.cc +++ b/fuzz/compress_yuv.cc @@ -97,9 +97,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) else restartEnv[11] = '0'; - /* tjLoadImage() ignores 0-pixel images and images larger than 1 Megapixel - when FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION is defined (yes, that's - a dirty hack), so we don't need to check the width and height here. */ + /* tjLoadImage() refuses to load images larger than 1 Megapixel when + FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION is defined (yes, that's a dirty + hack), so we don't need to check the width and height here. */ if ((srcBuf = tjLoadImage(filename, &width, 1, &height, &pf, flags)) == NULL) continue; diff --git a/turbojpeg.c b/turbojpeg.c index 20b18d15..3500c782 100644 --- a/turbojpeg.c +++ b/turbojpeg.c @@ -2093,7 +2093,7 @@ DLLEXPORT unsigned char *tjLoadImage(const char *filename, int *width, src->input_file = file; #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION - /* Ignore images larger than 1 Megapixel when fuzzing. */ + /* Refuse to load images larger than 1 Megapixel when fuzzing. */ if (flags & TJFLAG_FUZZING) src->max_pixels = 1048576; #endif