aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aacpsdsp_template.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-05-25 22:02:20 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-07-08 19:45:46 +0200
commit32aa3e55b1650ff24801c8d16c930bc5f0500813 (patch)
treebf13e401b504ec0e7f2bf4d428f57b757f9ae769 /libavcodec/aacpsdsp_template.c
parent55e4a40e96b8c4b4c7a3e7f508ca41d0e28500dd (diff)
downloadffmpeg-32aa3e55b1650ff24801c8d16c930bc5f0500813.tar.gz
oavcodec/aacpsdsp_template: Use unsigned for hs0X to prevent undefined behavior
Fixes: signed integer overflow: 1073741842 + 1784008138 cannot be represented in type 'int' Fixes: 6792/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5677589835284480 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 62cb6fadf33de6db386deac92853d4b95c930015) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/aacpsdsp_template.c')
-rw-r--r--libavcodec/aacpsdsp_template.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/aacpsdsp_template.c b/libavcodec/aacpsdsp_template.c
index 0e532fcf84..8f72624559 100644
--- a/libavcodec/aacpsdsp_template.c
+++ b/libavcodec/aacpsdsp_template.c
@@ -180,10 +180,10 @@ static void ps_stereo_interpolate_ipdopd_c(INTFLOAT (*l)[2], INTFLOAT (*r)[2],
INTFLOAT h01 = h[0][1], h11 = h[1][1];
INTFLOAT h02 = h[0][2], h12 = h[1][2];
INTFLOAT h03 = h[0][3], h13 = h[1][3];
- INTFLOAT hs00 = h_step[0][0], hs10 = h_step[1][0];
- INTFLOAT hs01 = h_step[0][1], hs11 = h_step[1][1];
- INTFLOAT hs02 = h_step[0][2], hs12 = h_step[1][2];
- INTFLOAT hs03 = h_step[0][3], hs13 = h_step[1][3];
+ UINTFLOAT hs00 = h_step[0][0], hs10 = h_step[1][0];
+ UINTFLOAT hs01 = h_step[0][1], hs11 = h_step[1][1];
+ UINTFLOAT hs02 = h_step[0][2], hs12 = h_step[1][2];
+ UINTFLOAT hs03 = h_step[0][3], hs13 = h_step[1][3];
int n;
for (n = 0; n < len; n++) {