mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-29 10:52:20 +00:00
avformat/rmdec: check against mismatching int4 interleaver parameters which would leave uninitialized holes
Fixes use of uninitialized memory Fixes: msan_uninit-mem_7f9cf38857c0_4582_coop.ra Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
1486ed0815
commit
4e394a98f2
@ -271,6 +271,10 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
|
||||
sub_packet_h <= 1 ||
|
||||
ast->coded_framesize * sub_packet_h > (2 + (sub_packet_h & 1)) * ast->audio_framesize)
|
||||
return AVERROR_INVALIDDATA;
|
||||
if (ast->coded_framesize * sub_packet_h != 2*ast->audio_framesize) {
|
||||
avpriv_request_sample(s, "mismatching interleaver parameters");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
break;
|
||||
case DEINT_ID_GENR:
|
||||
if (ast->sub_packet_size <= 0 ||
|
||||
|
Loading…
Reference in New Issue
Block a user