OSDN Git Service
(root)
/
coroid
/
libav_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2b7ed3
)
Check if buffer is large enough for given resolution.
author
Daniel Kang
<daniel.d.kang@gmail.com>
Fri, 7 Jan 2011 21:54:52 +0000
(21:54 +0000)
committer
Carl Eugen Hoyos
<cehoyos@rainbow.studorg.tuwien.ac.at>
Fri, 7 Jan 2011 21:54:52 +0000
(21:54 +0000)
Fixes issue 2501.
Patch by Daniel Kang, daniel.d.kang at gmail
Originally committed as revision 26258 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/cljr.c
patch
|
blob
|
history
diff --git
a/libavcodec/cljr.c
b/libavcodec/cljr.c
index
47809c0
..
96c9bdf
100644
(file)
--- a/
libavcodec/cljr.c
+++ b/
libavcodec/cljr.c
@@
-54,6
+54,11
@@
static int decode_frame(AVCodecContext *avctx,
if(p->data[0])
avctx->release_buffer(avctx, p);
+ if(buf_size/avctx->height < avctx->width) {
+ av_log(avctx, AV_LOG_ERROR, "Resolution larger than buffer size. Invalid header?\n");
+ return -1;
+ }
+
p->reference= 0;
if(avctx->get_buffer(avctx, p) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");