summaryrefslogtreecommitdiff
path: root/libavformat/nuv.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-27 20:09:49 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-27 20:13:07 +0100
commitf955abe33321f2e28617a3db196be705c5453219 (patch)
treecb52e6955ea77cab0132456523b801447be66147 /libavformat/nuv.c
parentb04cbbe25555e5026bbe9cdc5f13ceaeeee3e535 (diff)
parente71149a7a5b10ed7baa5a06f47d0313c7bd8df52 (diff)
Merge commit 'e71149a7a5b10ed7baa5a06f47d0313c7bd8df52'
* commit 'e71149a7a5b10ed7baa5a06f47d0313c7bd8df52': nuv: validate image size Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/nuv.c')
-rw-r--r--libavformat/nuv.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/nuv.c b/libavformat/nuv.c
index e7f0eeae8e..65d2e56f19 100644
--- a/libavformat/nuv.c
+++ b/libavformat/nuv.c
@@ -20,6 +20,7 @@
*/
#include "libavutil/channel_layout.h"
+#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/intfloat.h"
#include "avformat.h"
@@ -185,6 +186,10 @@ static int nuv_header(AVFormatContext *s)
return AVERROR(ENOMEM);
ctx->v_id = vst->index;
+ ret = av_image_check_size(width, height, 0, ctx);
+ if (ret < 0)
+ return ret;
+
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_id = AV_CODEC_ID_NUV;
vst->codec->width = width;