Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-12-13 02:38:29 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2020-01-18 20:35:57 +0300
commit1e23b5a706cd378ed07a200dfee656b38504f165 (patch)
tree8dbb1659f2b7073fb3e66d8e4fe59b2daa834513 /libavcodec/hevc_mp4toannexb_bsf.c
parenta70d8363648fdd380df7f2ed39eaccf08d406e6a (diff)
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>
Diffstat (limited to 'libavcodec/hevc_mp4toannexb_bsf.c')
-rw-r--r--libavcodec/hevc_mp4toannexb_bsf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hevc_mp4toannexb_bsf.c b/libavcodec/hevc_mp4toannexb_bsf.c
index 09bce5b34c..d0f1b94f0e 100644
--- a/libavcodec/hevc_mp4toannexb_bsf.c
+++ b/libavcodec/hevc_mp4toannexb_bsf.c
@@ -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);