OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c51d79
)
nuv: validate image size
author
Vittorio Giovara
<vittorio.giovara@gmail.com>
Fri, 23 Jan 2015 15:03:09 +0000
(15:03 +0000)
committer
Vittorio Giovara
<vittorio.giovara@gmail.com>
Tue, 27 Jan 2015 15:26:37 +0000
(15:26 +0000)
Avoid a division by zero.
CC: libav-stable@libav.org
Bug-Id: CID 717750
libavformat/nuv.c
patch
|
blob
|
history
diff --git
a/libavformat/nuv.c
b/libavformat/nuv.c
index
9336912
..
586aec6
100644
(file)
--- 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"
@@
-188,6
+189,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;