Commit 51f6e2d7 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/hevc_mp4toannexb_bsf: Avoid NULL memcpy()

Fixes: invalid memcpy use
Fixes: 19299/clusterfuzz-testcase-minimized-ffmpeg_BSF_HEVC_MP4TOANNEXB_fuzzer-5169193398042624

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1e23b5a7)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent ff7e2172
......@@ -180,7 +180,7 @@ static int hevc_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
if (ret < 0)
goto fail;
if (add_extradata)
if (extra_size)
memcpy(out + out_size, ctx->spspps_buf, extra_size);
AV_WB32(out + out_size + extra_size, 1);
bytestream2_get_buffer(&gb, out + out_size + 4 + extra_size, nalu_size);
......
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