From 63c9a69fbdfce0ff2a94206e8ea4b6721fd5b6af Mon Sep 17 00:00:00 2001 From: James Zern Date: Wed, 23 Jan 2019 23:22:38 -0800 Subject: [PATCH] tag the VP8LHashPix() function for potential uint roll-over BUG=webp:412 Change-Id: I10af39b774ef8e5d138670ddeaca4e15eade4ff6 --- src/utils/color_cache_utils.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/color_cache_utils.h b/src/utils/color_cache_utils.h index ee3e58ea..ec21d519 100644 --- a/src/utils/color_cache_utils.h +++ b/src/utils/color_cache_utils.h @@ -17,6 +17,7 @@ #include +#include "src/dsp/dsp.h" #include "src/webp/types.h" #ifdef __cplusplus @@ -32,7 +33,8 @@ typedef struct { static const uint32_t kHashMul = 0x1e35a7bdu; -static WEBP_INLINE int VP8LHashPix(uint32_t argb, int shift) { +static WEBP_UBSAN_IGNORE_UNSIGNED_OVERFLOW WEBP_INLINE +int VP8LHashPix(uint32_t argb, int shift) { return (int)((argb * kHashMul) >> shift); }