mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
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/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1e23b5a706
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
831ac9ad46
commit
a0d0e9b245
@ -164,7 +164,7 @@ static int hevc_mp4toannexb_filter(AVBSFContext *ctx, AVPacket *out)
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
|
||||
if (add_extradata)
|
||||
if (extra_size)
|
||||
memcpy(out->data + prev_size, ctx->par_out->extradata, extra_size);
|
||||
AV_WB32(out->data + prev_size + extra_size, 1);
|
||||
bytestream2_get_buffer(&gb, out->data + prev_size + 4 + extra_size, nalu_size);
|
||||
|
Loading…
Reference in New Issue
Block a user