tools/target_dec_fuzzer: Init parsepkt
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 30 Aug 2019 22:03:57 +0000 (00:03 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 31 Aug 2019 15:33:56 +0000 (17:33 +0200)
Fixes: memory corruption
Fixes: 16702/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PNG_fuzzer-5768418552184832

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tools/target_dec_fuzzer.c

index e22a0c5c345ba29f9fa4fee1d7db4ed271d64e1c..901dbca385fab6a764ab1289d60ffcd5732a480d 100644 (file)
@@ -194,6 +194,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
     // Read very simple container
     AVPacket avpkt, parsepkt;
     av_init_packet(&avpkt);
+    av_init_packet(&parsepkt);
     while (data < end && it < maxiteration) {
         // Search for the TAG
         while (data + sizeof(fuzz_tag) < end) {