You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avformat/mxfdec: Ensure klv->key is initialized
Fixes: read of uninitialized memory Fixes: 391916474/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-4935250956845056 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@ -491,7 +491,9 @@ static int klv_read_packet(MXFContext *mxf, KLVPacket *klv, AVIOContext *pb)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
memcpy(klv->key, mxf_klv_key, 4);
|
||||
avio_read(pb, klv->key + 4, 12);
|
||||
int ret = ffio_read_size(pb, klv->key + 4, 12);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
length = klv_decode_ber_length(pb, &llen);
|
||||
if (length < 0)
|
||||
return length;
|
||||
|
Reference in New Issue
Block a user