mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-04 22:50:24 +00:00
avcodec/vp9: Rollback dimensions when format is rejected
Fixes: BMO#2029296
Found-by: Mozilla Security Team, Paul Adenot for the write variant
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6c114bd6fa)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
bba81b7b51
commit
a240e91f49
1 changed files with 3 additions and 1 deletions
|
|
@ -248,8 +248,10 @@ static int update_size(AVCodecContext *avctx, int w, int h)
|
|||
*fmtp = AV_PIX_FMT_NONE;
|
||||
|
||||
ret = ff_get_format(avctx, pix_fmts);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
ff_set_dimensions(avctx, s->w, s->h);
|
||||
return ret;
|
||||
}
|
||||
|
||||
avctx->pix_fmt = ret;
|
||||
s->gf_fmt = s->pix_fmt;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue