diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-07-14 01:45:29 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-07-16 02:07:27 +0300 |
commit | 0ef8f03133a0bd83c74200a8cf30982c0f574016 (patch) | |
tree | a506fd1174da291c40bcdd7eebcbab49c57d74e6 /libavcodec/aac_defines.h | |
parent | d0ba0be35530bebe6cd83e470302ec6d38705453 (diff) |
avcodec/aacdec_template: Fix undefined integer overflow in apply_tns()
Fixes: runtime error: signed integer overflow: -2147483648 - 1202286525 cannot be represented in type 'int'
Fixes: 2071/clusterfuzz-testcase-minimized-6036414271586304
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/aac_defines.h')
-rw-r--r-- | libavcodec/aac_defines.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/aac_defines.h b/libavcodec/aac_defines.h index 3c79a8a4a1..438d78a7aa 100644 --- a/libavcodec/aac_defines.h +++ b/libavcodec/aac_defines.h @@ -35,6 +35,7 @@ #define AAC_RENAME(x) x ## _fixed #define AAC_RENAME_32(x) x ## _fixed_32 typedef int INTFLOAT; +typedef unsigned UINTFLOAT; ///< Equivalent to INTFLOAT, Used as temporal cast to avoid undefined sign overflow operations. typedef int64_t INT64FLOAT; typedef int16_t SHORTFLOAT; typedef SoftFloat AAC_FLOAT; @@ -83,6 +84,7 @@ typedef int AAC_SIGNE; #define AAC_RENAME(x) x #define AAC_RENAME_32(x) x typedef float INTFLOAT; +typedef float UINTFLOAT; typedef float INT64FLOAT; typedef float SHORTFLOAT; typedef float AAC_FLOAT; |