Commit 8576b377 authored by michael's avatar michael

fix infinite loop (suggested change by rjayne at convera dot com)

fixes bug #1160195


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@4434 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent a8538473
......@@ -274,6 +274,9 @@ static int cinepak_decode_strip (CinepakContext *s,
while ((data + 4) <= eod) {
chunk_id = BE_16 (&data[0]);
chunk_size = BE_16 (&data[2]) - 4;
if(chunk_size < 0)
return -1;
data += 4;
chunk_size = ((data + chunk_size) > eod) ? (eod - data) : chunk_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment