mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Check decoded dimensions for validity
Originally committed as revision 11184 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
ea61e33a7f
commit
b192e56461
@ -119,6 +119,8 @@ static int rv40_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceIn
|
|||||||
t = get_bits(gb, 13); /// ???
|
t = get_bits(gb, 13); /// ???
|
||||||
if(!si->type || !get_bits1(gb))
|
if(!si->type || !get_bits1(gb))
|
||||||
rv40_parse_picture_size(gb, &w, &h);
|
rv40_parse_picture_size(gb, &w, &h);
|
||||||
|
if(avcodec_check_dimensions(r->s.avctx, w, h) < 0)
|
||||||
|
return -1;
|
||||||
si->width = w;
|
si->width = w;
|
||||||
si->height = h;
|
si->height = h;
|
||||||
mb_size = ((w + 15) >> 4) * ((h + 15) >> 4);
|
mb_size = ((w + 15) >> 4) * ((h + 15) >> 4);
|
||||||
|
Loading…
Reference in New Issue
Block a user