jchuff.c: Fix MSan error
Certain rare malformed input images can cause the Huffman encoder to generate a value for nbits that corresponds to an uninitialized member of the DC code table. The ramifications of this are minimal and would basically amount to a different bogus JPEG image being generated from a particular bogus input image.
This commit is contained in:
@@ -84,11 +84,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
iterations. */
|
||||
if (ti == 0)
|
||||
flags |= TJFLAG_BOTTOMUP | TJFLAG_ACCURATEDCT;
|
||||
#if !defined(__has_feature) || !__has_feature(memory_sanitizer)
|
||||
/* The libjpeg-turbo baseline Huffman encoder produces false positives with
|
||||
MemorySanitizer. */
|
||||
else if (ti == 1)
|
||||
#endif
|
||||
flags |= TJFLAG_PROGRESSIVE;
|
||||
|
||||
/* tjLoadImage() ignores 0-pixel images and images larger than 1 Megapixel
|
||||
|
||||
Reference in New Issue
Block a user