avformat/mxfdec: Check avio_read() success in mxf_decrypt_triplet()
Fixes: Use of uninitialized memory
Fixes: 71444/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-5448597561212928
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 6ecc96f4d0)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
38c32b24f9
commit
39211a28d7
1 changed files with 2 additions and 1 deletions
|
|
@ -635,7 +635,8 @@ static int mxf_decrypt_triplet(AVFormatContext *s, AVPacket *pkt, KLVPacket *klv
|
|||
if (size < 32 || size - 32 < orig_size || (int)orig_size != orig_size)
|
||||
return AVERROR_INVALIDDATA;
|
||||
avio_read(pb, ivec, 16);
|
||||
avio_read(pb, tmpbuf, 16);
|
||||
if (avio_read(pb, tmpbuf, 16) != 16)
|
||||
return AVERROR_INVALIDDATA;
|
||||
if (mxf->aesc)
|
||||
av_aes_crypt(mxf->aesc, tmpbuf, tmpbuf, 1, ivec, 1);
|
||||
if (memcmp(tmpbuf, checkv, 16))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue