projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
504530b
)
Fix crash for files with strip size larger than the buffer.
author
Daniel Kang
<daniel.d.kang@gmail.com>
Thu, 6 Jan 2011 14:44:50 +0000
(14:44 +0000)
committer
Carl Eugen Hoyos
<cehoyos@rainbow.studorg.tuwien.ac.at>
Thu, 6 Jan 2011 14:44:50 +0000
(14:44 +0000)
Fixes issue 2498.
Patch by Daniel Kang, daniel.d.kang at gmail
Originally committed as revision 26243 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/tiff.c
patch
|
blob
|
history
diff --git
a/libavcodec/tiff.c
b/libavcodec/tiff.c
index
285cc40
..
a23af1a
100644
(file)
--- a/
libavcodec/tiff.c
+++ b/
libavcodec/tiff.c
@@
-531,6
+531,11
@@
static int decode_frame(AVCodecContext *avctx,
else
ssize = s->stripsize;
+ if (ssize > buf_size) {
+ av_log(avctx, AV_LOG_ERROR, "Buffer size is smaller than strip size\n");
+ return -1;
+ }
+
if(s->stripdata){
soff = tget(&s->stripdata, s->sot, s->le);
}else