avformat/matroskadec: check generic audio deinterleaver sub_packet_size against frame_size
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f67d052a530_7517_nosound.mkv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a1ed1c2193)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
763a808c96
commit
6da213ce20
1 changed files with 1 additions and 1 deletions
|
|
@ -2178,7 +2178,7 @@ static int matroska_parse_rm_audio(MatroskaDemuxContext *matroska,
|
|||
}
|
||||
memcpy(track->audio.buf + y*w, data, w);
|
||||
} else {
|
||||
if (size < sps * w / sps || h<=0) {
|
||||
if (size < sps * w / sps || h<=0 || w%sps) {
|
||||
av_log(matroska->ctx, AV_LOG_ERROR,
|
||||
"Corrupt generic RM-style audio packet size\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue