Commit 67eff529 authored by Frank Barchard's avatar Frank Barchard Committed by Commit Bot

ubsan fix for 16 bit scaling

Bug: libyuv:813
Test: tested downstream for ubsan.
Change-Id: I28c1d4e815348d051f781c9b7d8197f74905cab7
Reviewed-on: https://chromium-review.googlesource.com/1173721Reviewed-by: 's avatarFrank Barchard <fbarchard@chromium.org>
Reviewed-by: 's avatarMirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
parent 91f0a750
......@@ -542,7 +542,7 @@ void ScaleFilterCols64_C(uint8_t* dst_ptr,
// Same as 8 bit arm blender but return is cast to uint16_t
#define BLENDER(a, b, f) \
(uint16_t)((int)(a) + ((((int)((f)) * ((int)(b) - (int)(a))) + 0x8000) >> 16))
(uint16_t)((int)(a) + (int)((((int64_t)((f)) * ((int64_t)(b) - (int)(a))) + 0x8000) >> 16))
void ScaleFilterCols_16_C(uint16_t* dst_ptr,
const uint16_t* src_ptr,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment