mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/pictordec: run av_image_check_size() unconditionally
This ensures that no invalid size leaks through (This issue is hypothetical, ive no testcase) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
d21e496cf5
commit
8088d6f5f1
@ -140,9 +140,9 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
|
||||
avctx->pix_fmt = AV_PIX_FMT_PAL8;
|
||||
|
||||
if (s->width != avctx->width && s->height != avctx->height) {
|
||||
if (av_image_check_size(s->width, s->height, 0, avctx) < 0)
|
||||
return -1;
|
||||
if (s->width != avctx->width && s->height != avctx->height) {
|
||||
avcodec_set_dimensions(avctx, s->width, s->height);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user