Commit 5af613cc authored by Michael Niedermayer's avatar Michael Niedermayer

tools/target_dec_fuzzer: Do not corrupt the packet size return

Fixes: Timeout (infinite)
Fixes: 16732/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TAK_fuzzer-5642166377906176

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegReviewed-by: 's avatarJames Almer <jamrial@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 8f49176e
...@@ -219,8 +219,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { ...@@ -219,8 +219,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
if (!avpkt.buf) if (!avpkt.buf)
error("Failed memory allocation"); error("Failed memory allocation");
} else { } else {
ret = av_packet_make_refcounted(&avpkt); if (av_packet_make_refcounted(&avpkt) < 0)
if (ret < 0)
error("Failed memory allocation"); error("Failed memory allocation");
} }
parsepkt.data += ret; parsepkt.data += ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment