diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-06-19 10:06:38 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-06-19 10:06:38 +0200 |
commit | ddefb80c95d88e88aeb7bc938d58c0389bb83b78 (patch) | |
tree | 2495a5f33cf6e43f0b6f4e419f28dce0ae093eb1 /libavcodec/sonic.c | |
parent | 694c2d1ab3a870b2a27aaab526f0040f1119c235 (diff) | |
download | ffmpeg-ddefb80c95d88e88aeb7bc938d58c0389bb83b78.tar.gz |
sonicenc: fix off by 1 error
Fixes out of array accesses
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/sonic.c')
-rw-r--r-- | libavcodec/sonic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c index 512e89ed01..cb7309c2b4 100644 --- a/libavcodec/sonic.c +++ b/libavcodec/sonic.c @@ -430,7 +430,7 @@ static void modified_levinson_durbin(int *window, int window_entries, int *x_ptr = &(window[step]); int *state_ptr = &(state[0]); j = window_entries - step; - for (;j>=0;j--,x_ptr++,state_ptr++) + for (;j>0;j--,x_ptr++,state_ptr++) { double x_value = *x_ptr; double state_value = *state_ptr; @@ -465,7 +465,7 @@ static void modified_levinson_durbin(int *window, int window_entries, x_ptr = &(window[step]); state_ptr = &(state[0]); j = window_entries - step; - for (;j>=0;j--,x_ptr++,state_ptr++) + for (;j>0;j--,x_ptr++,state_ptr++) { int x_value = *x_ptr; int state_value = *state_ptr; |