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
2424 * RV30/40 decoder common data
2525 */
2626
27+#include "libavutil/imgutils.h"
2728 #include "libavutil/internal.h"
2829
2930 #include "avcodec.h"
@@ -1661,6 +1662,9 @@ int ff_rv34_decode_frame(AVCodecContext *avctx, · 1631 unmodified lines
16611662 av_log(s->avctx, AV_LOG_WARNING, "Changing dimensions to %dx%d\n",
16621663 si.width, si.height);
16631664
1665+ if (av_image_check_size(si.width, si.height, 0, s->avctx))
1666+ return AVERROR_INVALIDDATA;
1667+
16641668 s->width = si.width;
16651669 s->height = si.height;
16661670 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