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:
99b823f
)
avcodec/ansi: Check dimensions
author
Michael Niedermayer
<michael@niedermayer.cc>
Mon, 26 Sep 2016 18:25:59 +0000
(20:25 +0200)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Mon, 26 Sep 2016 19:42:17 +0000
(21:42 +0200)
Fixes: 1.avi
Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/ansi.c
patch
|
blob
|
history
diff --git
a/libavcodec/ansi.c
b/libavcodec/ansi.c
index
4808ea7
..
19c88d8
100644
(file)
--- a/
libavcodec/ansi.c
+++ b/
libavcodec/ansi.c
@@
-94,6
+94,9
@@
static av_cold int decode_init(AVCodecContext *avctx)
int ret = ff_set_dimensions(avctx, 80 << 3, 25 << 4);
if (ret < 0)
return ret;
+ } else if (avctx->width % FONT_WIDTH || avctx->height % s->font_height) {
+ av_log(avctx, AV_LOG_ERROR, "Invalid dimensions %d %d\n", avctx->width, avctx->height);
+ return AVERROR(EINVAL);
}
return 0;
}