avcodec/dct32_template: Fix runtime error: signed integer overflow: -1071326067 ...
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 21 May 2017 21:35:21 +0000 (23:35 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 22 May 2017 00:16:39 +0000 (02:16 +0200)
Fixes: 1731/clusterfuzz-testcase-minimized-5123972414832640

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

index bb3f155..51cebc0 100644 (file)
 #define ADD(a, b) val##a += val##b
 
 /* DCT32 without 1/sqrt(2) coef zero scaling. */
 #define ADD(a, b) val##a += val##b
 
 /* DCT32 without 1/sqrt(2) coef zero scaling. */
-void dct32(INTFLOAT *out, const INTFLOAT *tab)
+void dct32(INTFLOAT *out, const INTFLOAT *tab_arg)
 {
 {
+    const SUINTFLOAT *tab = tab_arg;
     SUINTFLOAT tmp0, tmp1;
 
     SUINTFLOAT val0 , val1 , val2 , val3 , val4 , val5 , val6 , val7 ,
     SUINTFLOAT tmp0, tmp1;
 
     SUINTFLOAT val0 , val1 , val2 , val3 , val4 , val5 , val6 , val7 ,