tag the VP8LHashPix() function for potential uint roll-over

BUG=webp:412

Change-Id: I10af39b774ef8e5d138670ddeaca4e15eade4ff6
This commit is contained in:
James Zern 2019-01-23 23:22:38 -08:00
parent bf424b46a3
commit 63c9a69fbd

View File

@ -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);
}