mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-11 17:30:00 +01:00
sp5xdec: fix off by 1 error causing a crash
Fixes Ticket1633 Found-by: Piotr Bandurski <ami_stuff@o2.pl> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -72,7 +72,7 @@ static int sp5x_decode_frame(AVCodecContext *avctx,
|
|||||||
for (i = 2; i < buf_size-2 && j < buf_size+1024-2; i++)
|
for (i = 2; i < buf_size-2 && j < buf_size+1024-2; i++)
|
||||||
recoded[j++] = buf[i];
|
recoded[j++] = buf[i];
|
||||||
else
|
else
|
||||||
for (i = 14; i < buf_size && j < buf_size+1024-2; i++)
|
for (i = 14; i < buf_size && j < buf_size+1024-3; i++)
|
||||||
{
|
{
|
||||||
recoded[j++] = buf[i];
|
recoded[j++] = buf[i];
|
||||||
if (buf[i] == 0xff)
|
if (buf[i] == 0xff)
|
||||||
|
|||||||
Reference in New Issue
Block a user