[FFmpeg-cvslog] avcodec/sonic: Fix integer overflow in predictor_calc_error()

2019-11-22 Thread Michael Niedermayer
ffmpeg | branch: release/3.4 | Michael Niedermayer  | 
Mon Oct 21 23:41:49 2019 +0200| [c2f81cfc78fe59b1dbdb8d10dcda43bc8365e655] | 
committer: Michael Niedermayer

avcodec/sonic: Fix integer overflow in predictor_calc_error()

Fixes: signed integer overflow: 5 * -1094995529 cannot be represented in type 
'int'
Fixes: 
18346/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-5709623893426176

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 
(cherry picked from commit c8c17b8cef77dc052e8845e5fd86daf2983fd7dd)
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c2f81cfc78fe59b1dbdb8d10dcda43bc8365e655
---

 libavcodec/sonic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c
index 2e3ca79fdd..953c70fcd4 100644
--- a/libavcodec/sonic.c
+++ b/libavcodec/sonic.c
@@ -473,7 +473,7 @@ static int predictor_calc_error(int *k, int *state, int 
order, int error)
 {
 int k_value = *k_ptr, state_value = *state_ptr;
 x -= shift_down(k_value * state_value, LATTICE_SHIFT);
-state_ptr[1] = state_value + shift_down(k_value * x, LATTICE_SHIFT);
+state_ptr[1] = state_value + shift_down(k_value * (unsigned)x, 
LATTICE_SHIFT);
 }
 #else
 for (i = order-2; i >= 0; i--)

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avcodec/sonic: Fix integer overflow in predictor_calc_error()

2019-11-21 Thread Michael Niedermayer
ffmpeg | branch: release/4.0 | Michael Niedermayer  | 
Mon Oct 21 23:41:49 2019 +0200| [17d5c21b3d1249672323bd1ab09718e29ce77e91] | 
committer: Michael Niedermayer

avcodec/sonic: Fix integer overflow in predictor_calc_error()

Fixes: signed integer overflow: 5 * -1094995529 cannot be represented in type 
'int'
Fixes: 
18346/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-5709623893426176

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 
(cherry picked from commit c8c17b8cef77dc052e8845e5fd86daf2983fd7dd)
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=17d5c21b3d1249672323bd1ab09718e29ce77e91
---

 libavcodec/sonic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c
index 2e3ca79fdd..953c70fcd4 100644
--- a/libavcodec/sonic.c
+++ b/libavcodec/sonic.c
@@ -473,7 +473,7 @@ static int predictor_calc_error(int *k, int *state, int 
order, int error)
 {
 int k_value = *k_ptr, state_value = *state_ptr;
 x -= shift_down(k_value * state_value, LATTICE_SHIFT);
-state_ptr[1] = state_value + shift_down(k_value * x, LATTICE_SHIFT);
+state_ptr[1] = state_value + shift_down(k_value * (unsigned)x, 
LATTICE_SHIFT);
 }
 #else
 for (i = order-2; i >= 0; i--)

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avcodec/sonic: Fix integer overflow in predictor_calc_error()

2019-11-20 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Mon 
Oct 21 23:41:49 2019 +0200| [c8c17b8cef77dc052e8845e5fd86daf2983fd7dd] | 
committer: Michael Niedermayer

avcodec/sonic: Fix integer overflow in predictor_calc_error()

Fixes: signed integer overflow: 5 * -1094995529 cannot be represented in type 
'int'
Fixes: 
18346/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-5709623893426176

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c8c17b8cef77dc052e8845e5fd86daf2983fd7dd
---

 libavcodec/sonic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c
index 34d2952e69..219412eb77 100644
--- a/libavcodec/sonic.c
+++ b/libavcodec/sonic.c
@@ -473,7 +473,7 @@ static int predictor_calc_error(int *k, int *state, int 
order, int error)
 {
 int k_value = *k_ptr, state_value = *state_ptr;
 x -= shift_down(k_value * state_value, LATTICE_SHIFT);
-state_ptr[1] = state_value + shift_down(k_value * x, LATTICE_SHIFT);
+state_ptr[1] = state_value + shift_down(k_value * (unsigned)x, 
LATTICE_SHIFT);
 }
 #else
 for (i = order-2; i >= 0; i--)

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".