aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-08-03 13:30:28 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2024-08-14 18:20:59 +0200
commita0f22218f74e3af73492e05e6696546b0da8d40e (patch)
tree874155564eabb70d7a846d207c64930849a3a215
parentd7f83fc2f423863b78c140ba23b5d28058a59f45 (diff)
downloadffmpeg-a0f22218f74e3af73492e05e6696546b0da8d40e.tar.gz
bsf/media100_to_mjpegb: Clear output buffer padding
Fixes: use-of-uninitialized-value Fixes: 70855/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MEDIA100_fuzzer-5537446610141184 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/bsf/media100_to_mjpegb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/bsf/media100_to_mjpegb.c b/libavcodec/bsf/media100_to_mjpegb.c
index 6e117ae20f..4b2dc1a35a 100644
--- a/libavcodec/bsf/media100_to_mjpegb.c
+++ b/libavcodec/bsf/media100_to_mjpegb.c
@@ -148,6 +148,7 @@ second_field:
AV_WB32(out->data + second_field_offset + 36, sod_offset[1] - second_field_offset);
out->size = bytestream2_tell_p(&pb);
+ memset(out->data + out->size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
ret = av_packet_copy_props(out, in);
if (ret < 0)