| Index: webrtc/common_audio/signal_processing/levinson_durbin.c
|
| diff --git a/webrtc/common_audio/signal_processing/levinson_durbin.c b/webrtc/common_audio/signal_processing/levinson_durbin.c
|
| index c8e58ba4555e4972296dacf7044e5cb8b51ff976..3e16b23f8b01c8e53ba85331e2d71dfecb342fe1 100644
|
| --- a/webrtc/common_audio/signal_processing/levinson_durbin.c
|
| +++ b/webrtc/common_audio/signal_processing/levinson_durbin.c
|
| @@ -16,11 +16,13 @@
|
| */
|
|
|
| #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
|
| +#include "webrtc/rtc_base/sanitizer.h"
|
|
|
| #define SPL_LEVINSON_MAXORDER 20
|
|
|
| -int16_t WebRtcSpl_LevinsonDurbin(const int32_t* R, int16_t* A, int16_t* K,
|
| - size_t order)
|
| +int16_t RTC_NO_SANITIZE("signed-integer-overflow") // bugs.webrtc.org/5486
|
| +WebRtcSpl_LevinsonDurbin(const int32_t* R, int16_t* A, int16_t* K,
|
| + size_t order)
|
| {
|
| size_t i, j;
|
| // Auto-correlation coefficients in high precision
|
| @@ -44,6 +46,8 @@ int16_t WebRtcSpl_LevinsonDurbin(const int32_t* R, int16_t* A, int16_t* K,
|
| for (i = 0; i <= order; ++i)
|
| {
|
| temp1W32 = R[i] * (1 << norm);
|
| + // UBSan: 12 * 268435456 cannot be represented in type 'int'
|
| +
|
| // Put R in hi and low format
|
| R_hi[i] = (int16_t)(temp1W32 >> 16);
|
| R_low[i] = (int16_t)((temp1W32 - ((int32_t)R_hi[i] * 65536)) >> 1);
|
|
|