Browse Source

Fix crash for files with strip size larger than the buffer.

Fixes issue 2498.

Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26243 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/n0.8
Daniel Kang Carl Eugen Hoyos 14 years ago
parent
commit
1ba44140a3
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavcodec/tiff.c

+ 5
- 0
libavcodec/tiff.c View File

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


Loading…
Cancel
Save