diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-08-16 03:15:14 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-08-16 03:15:14 +0200 |
commit | f0896a6bd94e5b45447c7d640c8e8aa95d860d7a (patch) | |
tree | 877c29403dca1b1834011581555d4a3980e698c1 /libavcodec/sp5xdec.c | |
parent | 747774ece9b0cdb4e67118408a1bb244f29d1d75 (diff) | |
download | ffmpeg-f0896a6bd94e5b45447c7d640c8e8aa95d860d7a.tar.gz |
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>
Diffstat (limited to 'libavcodec/sp5xdec.c')
-rw-r--r-- | libavcodec/sp5xdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/sp5xdec.c b/libavcodec/sp5xdec.c index 8715c8db9d..7216088e7f 100644 --- a/libavcodec/sp5xdec.c +++ b/libavcodec/sp5xdec.c @@ -72,7 +72,7 @@ static int sp5x_decode_frame(AVCodecContext *avctx, for (i = 2; i < buf_size-2 && j < buf_size+1024-2; i++) recoded[j++] = buf[i]; 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]; if (buf[i] == 0xff) |