Skip to content
Snippets Groups Projects
Commit 1ba44140 authored by Daniel Kang's avatar Daniel Kang Committed by Carl Eugen Hoyos
Browse files

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
parent 504530bf
No related branches found
No related tags found
No related merge requests found
...@@ -531,6 +531,11 @@ static int decode_frame(AVCodecContext *avctx, ...@@ -531,6 +531,11 @@ static int decode_frame(AVCodecContext *avctx,
else else
ssize = s->stripsize; 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){ if(s->stripdata){
soff = tget(&s->stripdata, s->sot, s->le); soff = tget(&s->stripdata, s->sot, s->le);
}else }else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment