From 6bace81b1beebfa7efef1308390a7c64f178e437 Mon Sep 17 00:00:00 2001 From: DRC Date: Thu, 31 Oct 2024 11:54:32 -0400 Subject: [PATCH] Fix OSS-Fuzz decompress_yuv fuzzer MSan failure --- fuzz/decompress_yuv.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fuzz/decompress_yuv.cc b/fuzz/decompress_yuv.cc index 3f371c61..c1dcf9c9 100644 --- a/fuzz/decompress_yuv.cc +++ b/fuzz/decompress_yuv.cc @@ -86,7 +86,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) if ((dstBuf = (unsigned char *)tj3Alloc(w * h * tjPixelSize[pf])) == NULL) goto bailout; if ((yuvBuf = - (unsigned char *)malloc(tj3YUVBufSize(w, 1, h, jpegSubsamp))) == NULL) + (unsigned char *)tj3Alloc(tj3YUVBufSize(w, 1, h, + jpegSubsamp))) == NULL) goto bailout; if (tj3DecompressToYUV8(handle, data, size, yuvBuf, 1) == 0 &&