mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
rv34: check image size before using it
fixes assertion failure Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
7845f8d282
commit
68def00a63
@ -24,6 +24,7 @@
|
|||||||
* RV30/40 decoder common data
|
* RV30/40 decoder common data
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "libavutil/imgutils.h"
|
||||||
#include "libavutil/internal.h"
|
#include "libavutil/internal.h"
|
||||||
|
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
@ -1661,6 +1662,9 @@ int ff_rv34_decode_frame(AVCodecContext *avctx,
|
|||||||
av_log(s->avctx, AV_LOG_WARNING, "Changing dimensions to %dx%d\n",
|
av_log(s->avctx, AV_LOG_WARNING, "Changing dimensions to %dx%d\n",
|
||||||
si.width, si.height);
|
si.width, si.height);
|
||||||
|
|
||||||
|
if (av_image_check_size(si.width, si.height, 0, s->avctx))
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
s->width = si.width;
|
s->width = si.width;
|
||||||
s->height = si.height;
|
s->height = si.height;
|
||||||
avcodec_set_dimensions(s->avctx, s->width, s->height);
|
avcodec_set_dimensions(s->avctx, s->width, s->height);
|
||||||
|
Loading…
Reference in New Issue
Block a user