Commit 78485642 authored by arpi_esp's avatar arpi_esp

3rd 10l - don't let it read data beyond the end of frame


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@1083 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b690f036
......@@ -1283,7 +1283,7 @@ static int mjpeg_decode_frame(AVCodecContext *avctx,
while (src<buf_end)
{
unsigned char x = *(src++);
UINT8 x = *(src++);
*(dst++) = x;
if (x == 0xff)
......@@ -1295,7 +1295,7 @@ static int mjpeg_decode_frame(AVCodecContext *avctx,
break;
}
}
init_get_bits(&s->gb, s->buffer, s->buffer_size);
init_get_bits(&s->gb, s->buffer, dst - s->buffer);
}
else
init_get_bits(&s->gb, buf_ptr, buf_end - buf_ptr);
......
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