diff options
author | James Zern <jzern@google.com> | 2019-01-23 23:22:38 -0800 |
---|---|---|
committer | James Zern <jzern@google.com> | 2019-01-24 16:45:02 -0800 |
commit | 63c9a69fbdfce0ff2a94206e8ea4b6721fd5b6af (patch) | |
tree | d63e9674a8c8730596c2f039ac8d89cdf4404859 | |
parent | bf424b46a3d60e671678a092e728a9bb1ddf3f80 (diff) | |
download | libwebp-63c9a69fbdfce0ff2a94206e8ea4b6721fd5b6af.tar.gz |
tag the VP8LHashPix() function for potential uint roll-over
BUG=webp:412
Change-Id: I10af39b774ef8e5d138670ddeaca4e15eade4ff6
-rw-r--r-- | src/utils/color_cache_utils.h | 4 |
1 files changed, 3 insertions, 1 deletions
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 <assert.h> +#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); } |