avcodec/aacsbr_fixed: Fix integer overflow in sbr_hf_assemble()
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 7 Apr 2018 19:55:06 +0000 (21:55 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 7 Apr 2018 21:34:47 +0000 (23:34 +0200)
Fixes: runtime error: signed integer overflow: 2052929346 + 204817098 cannot be represented in type 'int'

This was missed in b1bef755f617af9685b592d866b3eb7f3c4b02b1
Fixes: 5275/clusterfuzz-testcase-minimized-5367635958038528

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/aacsbr_fixed.c

index eeada0b..59cbba1 100644 (file)
@@ -567,7 +567,7 @@ static void sbr_hf_assemble(int Y1[38][64][2],
                 int idx = indexsine&1;
                 int A = (1-((indexsine+(kx & 1))&2));
                 int B = (A^(-idx)) + idx;
-                int *out = &Y1[i][kx][idx];
+                unsigned *out = &Y1[i][kx][idx];
                 int shift;
                 unsigned round;