Browse Source

Merge commit 'e71149a7a5b10ed7baa5a06f47d0313c7bd8df52'

* commit 'e71149a7a5b10ed7baa5a06f47d0313c7bd8df52':
  nuv: validate image size

Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.6
Michael Niedermayer 11 years ago
parent
commit
f955abe333
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavformat/nuv.c

+ 5
- 0
libavformat/nuv.c View File

@@ -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;


Loading…
Cancel
Save