wmaprodec: check num_sfb for validity. Fix out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
30bce34b67
commit
50f0a6b4e6
@ -412,6 +412,10 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
}
|
||||
s->sfb_offsets[i][band - 1] = subframe_len;
|
||||
s->num_sfb[i] = band - 1;
|
||||
if (s->num_sfb[i] <= 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "num_sfb invalid\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user