Commit db926357 authored by Sarah Parker's avatar Sarah Parker Committed by James Zern
Browse files

warped_motion: Fix ubsan warning for signed integer overflow

Change-Id: Ie698aa02ef56128759c71079e9bfa1af25149644
parent 565f788d
......@@ -215,7 +215,7 @@ static int32_t do_cubic_filter(int32_t *p, int x) {
} else if (x == (1 << WARPEDPIXEL_PREC_BITS)) {
return p[1];
} else {
const int64_t v1 = x * x * x * (3 * (p[0] - p[1]) + p[2] - p[-1]);
const int64_t v1 = (int64_t)x * x * x * (3 * (p[0] - p[1]) + p[2] - p[-1]);
const int64_t v2 = x * x * (2 * p[-1] - 5 * p[0] + 4 * p[1] - p[2]);
const int64_t v3 = x * (p[1] - p[-1]);
const int64_t v4 = 2 * p[0];
......
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