fixes assertion failure
Unified · Split
| @@ -24,6 +24,7 @@ · 23 unmodified lines | ||
| 24 | 24 | * RV30/40 decoder common data |
| 25 | 25 | */ |
| 26 | 26 | |
| 27 | +#include "libavutil/imgutils.h" | |
| 27 | 28 | #include "libavutil/internal.h" |
| 28 | 29 | |
| 29 | 30 | #include "avcodec.h" |
| @@ -1661,6 +1662,9 @@ int ff_rv34_decode_frame(AVCodecContext *avctx, · 1631 unmodified lines | ||
| 1661 | 1662 | av_log(s->avctx, AV_LOG_WARNING, "Changing dimensions to %dx%d\n", |
| 1662 | 1663 | si.width, si.height); |
| 1663 | 1664 | |
| 1665 | + if (av_image_check_size(si.width, si.height, 0, s->avctx)) | |
| 1666 | + return AVERROR_INVALIDDATA; | |
| 1667 | + | |
| 1664 | 1668 | s->width = si.width; |
| 1665 | 1669 | s->height = si.height; |
| 1666 | 1670 | avcodec_set_dimensions(s->avctx, s->width, s->height); |