mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
h261: check mtype.
Fixes out of array read Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
0b90db01b5
commit
ec3cd74f2d
@ -286,6 +286,10 @@ static int h261_decode_mb(H261Context *h){
|
||||
|
||||
// Read mtype
|
||||
h->mtype = get_vlc2(&s->gb, h261_mtype_vlc.table, H261_MTYPE_VLC_BITS, 2);
|
||||
if (h->mtype < 0) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "illegal mtype %d\n", h->mtype);
|
||||
return SLICE_ERROR;
|
||||
}
|
||||
h->mtype = h261_mtype_map[h->mtype];
|
||||
|
||||
// Read mquant
|
||||
|
Loading…
Reference in New Issue
Block a user