From 4cc157d48ad7c55684da87e953e898dbe92fb098 Mon Sep 17 00:00:00 2001 From: James Zern Date: Wed, 3 Aug 2022 15:40:07 -0700 Subject: [PATCH] ParseOptionalChunks: clear int sanitizer warning clears a warning of the form: src/dec/webp_dec.c:182:62: runtime error: implicit conversion from type 'int' of value -2 (32-bit, signed) to type 'unsigned int' changed the value to 4294967294 (32-bit, unsigned) Bug: b/229626362 Change-Id: Ibf08f8bb9ec345381b51ca3872745368fca700c0 --- src/dec/webp_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dec/webp_dec.c b/src/dec/webp_dec.c index 77a54c55..3f4f7bb6 100644 --- a/src/dec/webp_dec.c +++ b/src/dec/webp_dec.c @@ -179,7 +179,7 @@ static VP8StatusCode ParseOptionalChunks(const uint8_t** const data, return VP8_STATUS_BITSTREAM_ERROR; // Not a valid chunk size. } // For odd-sized chunk-payload, there's one byte padding at the end. - disk_chunk_size = (CHUNK_HEADER_SIZE + chunk_size + 1) & ~1; + disk_chunk_size = (CHUNK_HEADER_SIZE + chunk_size + 1) & ~1u; total_size += disk_chunk_size; // Check that total bytes skipped so far does not exceed riff_size.