aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ac3.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2023-01-06 23:36:12 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2023-01-11 12:12:25 +0100
commit2f48d227c153fa6f0a2156f3e8d18ea1bfedf18d (patch)
treef2e7dd516eae362f239daf29a9f4d433e00f9b72 /libavcodec/ac3.h
parent9ea6d93218c7d4581584df5b5b86b5f4fe0196b1 (diff)
downloadffmpeg-2f48d227c153fa6f0a2156f3e8d18ea1bfedf18d.tar.gz
avcodec/eac3dec: avoid float noise in fixed mode addition to overflow
Fixes: 2.28595e+09 is outside the range of representable values of type 'int' Fixes: 54644/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AC3_FIXED_fuzzer-4816961584627712 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/ac3.h')
-rw-r--r--libavcodec/ac3.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/ac3.h b/libavcodec/ac3.h
index 24304caa61..2386c15ad0 100644
--- a/libavcodec/ac3.h
+++ b/libavcodec/ac3.h
@@ -53,6 +53,7 @@
#define AC3_DYNAMIC_RANGE1 0
typedef int INTFLOAT;
+typedef unsigned int UINTFLOAT;
typedef int16_t SHORTFLOAT;
#else /* USE_FIXED */
@@ -73,6 +74,7 @@ typedef int16_t SHORTFLOAT;
#define AC3_DYNAMIC_RANGE1 1.0f
typedef float INTFLOAT;
+typedef float UINTFLOAT;
typedef float SHORTFLOAT;
#endif /* USE_FIXED */