matroskadec: check h in generic rm packet shuffler
Fixes crash Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
1f41cffe1e
commit
c2ca0163af
@ -2032,7 +2032,7 @@ static int matroska_parse_rm_audio(MatroskaDemuxContext *matroska,
|
||||
}
|
||||
memcpy(track->audio.buf + y*w, data, w);
|
||||
} else {
|
||||
if (size < sps * w / sps) {
|
||||
if (size < sps * w / sps || h<=0) {
|
||||
av_log(matroska->ctx, AV_LOG_ERROR,
|
||||
"Corrupt generic RM-style audio packet size\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
Loading…
x
Reference in New Issue
Block a user