commit | 364b7fa81b4c2d4e0a81f47fcc08c432555cc1c9 | [log] [tgz] |
---|---|---|
author | Wan-Teh Chang <wtc@google.com> | Mon Oct 07 18:11:10 2024 -0700 |
committer | Frank Barchard <fbarchard@chromium.org> | Tue Oct 08 01:14:35 2024 +0000 |
tree | ffae6c57154eb43ecfed42e2a5a0155b6cefb6c2 | |
parent | ffd791f749365096354ecb0d37a60b64b4b3518f [diff] |
Remove redundant unsigned integer overflow tests Bug: b/371615496 Change-Id: I28df888942085138a54e18c7e939300d959c68b0 Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5914872 Reviewed-by: Frank Barchard <fbarchard@chromium.org>
diff --git a/source/scale_rgb.cc b/source/scale_rgb.cc index 2ba7b79..8bc576c 100644 --- a/source/scale_rgb.cc +++ b/source/scale_rgb.cc
@@ -44,7 +44,7 @@ return -1; // Invalid size. } const uint64_t argb_size = src_argb_size + dst_argb_size; - if (argb_size < src_argb_size || argb_size < dst_argb_size || argb_size > SIZE_MAX) { + if (argb_size > SIZE_MAX) { return -1; // Invalid size. } uint8_t* src_argb = (uint8_t*)malloc((size_t)argb_size);