History

rv34: check image size before using it

fixes assertion failure

Michael Niedermayer committed 14 years ago

Commit 68def001 parent 7845f8d1 file · +4 −0Browse files

Unified · Split

libavcodec/rv34.c+4−0
@@ -24,6 +24,7 @@ · 23 unmodified lines
24 * RV30/40 decoder common data24 * RV30/40 decoder common data
25 */25 */
26 26
27#include "libavutil/imgutils.h"
27#include "libavutil/internal.h"28#include "libavutil/internal.h"
28 29
29#include "avcodec.h"30#include "avcodec.h"
@@ -1661,6 +1662,9 @@ int ff_rv34_decode_frame(AVCodecContext *avctx, · 1631 unmodified lines
1661 av_log(s->avctx, AV_LOG_WARNING, "Changing dimensions to %dx%d\n",1662 av_log(s->avctx, AV_LOG_WARNING, "Changing dimensions to %dx%d\n",
1662 si.width, si.height);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 s->width = si.width;1668 s->width = si.width;
1665 s->height = si.height;1669 s->height = si.height;
1666 avcodec_set_dimensions(s->avctx, s->width, s->height);1670 avcodec_set_dimensions(s->avctx, s->width, s->height);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t