From: Francois Cartegnie Date: Thu, 29 Jun 2017 07:45:20 +0000 (+0200) Subject: codec: avcodec: check avcodec visible sizes X-Git-Tag: archive/raspbian/2.2.6-5+rpi1^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=547f57562c5369906dc48dfda074cf17227c1872;p=vlc.git codec: avcodec: check avcodec visible sizes refs #18467 Gbp-Pq: Name 0011-codec-avcodec-check-avcodec-visible-sizes.patch --- diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c index a19e7f6e..b8b713f9 100644 --- a/modules/codec/avcodec/video.c +++ b/modules/codec/avcodec/video.c @@ -137,9 +137,11 @@ static inline picture_t *ffmpeg_NewPictBuf( decoder_t *p_dec, } - if( width == 0 || height == 0 || width > 8192 || height > 8192 ) + if( width == 0 || height == 0 || width > 8192 || height > 8192 || + width < p_context->width || height < p_context->height ) { - msg_Err( p_dec, "Invalid frame size %dx%d.", width, height ); + msg_Err( p_dec, "Invalid frame size %dx%d. vsz %dx%d", + width, height, p_context->width, p_context->height ); return NULL; /* invalid display size */ } p_dec->fmt_out.video.i_width = width;