OSS-Fuzz: Code comment tweaks for compr. targets
(oversight from 171b875b27)
This commit is contained in:
@@ -88,9 +88,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
|||||||
if (ti != 2)
|
if (ti != 2)
|
||||||
flags |= TJFLAG_NOREALLOC;
|
flags |= TJFLAG_NOREALLOC;
|
||||||
|
|
||||||
/* tjLoadImage() ignores 0-pixel images and images larger than 1 Megapixel
|
/* tjLoadImage() refuses to load images larger than 1 Megapixel when
|
||||||
when FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION is defined (yes, that's
|
FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION is defined (yes, that's a dirty
|
||||||
a dirty hack), so we don't need to check the width and height here. */
|
hack), so we don't need to check the width and height here. */
|
||||||
if ((srcBuf = tjLoadImage(filename, &width, 1, &height, &pf,
|
if ((srcBuf = tjLoadImage(filename, &width, 1, &height, &pf,
|
||||||
flags)) == NULL)
|
flags)) == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -97,9 +97,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
|||||||
else
|
else
|
||||||
restartEnv[11] = '0';
|
restartEnv[11] = '0';
|
||||||
|
|
||||||
/* tjLoadImage() ignores 0-pixel images and images larger than 1 Megapixel
|
/* tjLoadImage() refuses to load images larger than 1 Megapixel when
|
||||||
when FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION is defined (yes, that's
|
FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION is defined (yes, that's a dirty
|
||||||
a dirty hack), so we don't need to check the width and height here. */
|
hack), so we don't need to check the width and height here. */
|
||||||
if ((srcBuf = tjLoadImage(filename, &width, 1, &height, &pf,
|
if ((srcBuf = tjLoadImage(filename, &width, 1, &height, &pf,
|
||||||
flags)) == NULL)
|
flags)) == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -2093,7 +2093,7 @@ DLLEXPORT unsigned char *tjLoadImage(const char *filename, int *width,
|
|||||||
|
|
||||||
src->input_file = file;
|
src->input_file = file;
|
||||||
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
|
#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)
|
if (flags & TJFLAG_FUZZING)
|
||||||
src->max_pixels = 1048576;
|
src->max_pixels = 1048576;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user