diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-10 18:34:52 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-10 18:34:52 +0100 |
commit | 3af9d8269ea2878fb7960ab5ed52f4a75c73e6ec (patch) | |
tree | 8730e4a898a6cb896992485e64167a17f1f3829c | |
parent | 7fa9f7ef1c2f0cee81ec6ea6a4ff10af4c4fc62c (diff) | |
download | ffmpeg-3af9d8269ea2878fb7960ab5ed52f4a75c73e6ec.tar.gz |
avcodec/g2meet: check the return code of ff_set_dimensions()
This is currently redundant as the checks before it are tighter than
the checks in ff_set_dimensions() but its more robust not to depend
on that.
Fixes CID1135739
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/g2meet.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c index 8f8e88047a..9b70b61ef8 100644 --- a/libavcodec/g2meet.c +++ b/libavcodec/g2meet.c @@ -697,8 +697,11 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data, ret = AVERROR_INVALIDDATA; goto header_fail; } - if (c->width != avctx->width || c->height != avctx->height) - ff_set_dimensions(avctx, c->width, c->height); + if (c->width != avctx->width || c->height != avctx->height) { + ret = ff_set_dimensions(avctx, c->width, c->height); + if (ret < 0) + goto header_fail; + } c->compression = bytestream2_get_be32(&bc); if (c->compression != 2 && c->compression != 3) { av_log(avctx, AV_LOG_ERROR, |