From 88a9311bae53844c2c85ea06a0c7df5263f566bd Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Mon, 2 Jan 2017 21:24:50 +0100 Subject: [PATCH] UPSTREAM: util/romcc: Ensure that bit shift is valid BUG=None BRANCH=None TEST=None Signed-off-by: Patrick Georgi Found-by: Coverity Scan #1287090 Reviewed-on: https://review.coreboot.org/18020 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth Change-Id: Idbe147c1217f793b0360a752383203c658b0bdce Reviewed-on: https://chromium-review.googlesource.com/425287 Commit-Ready: Furquan Shaikh Tested-by: Furquan Shaikh Reviewed-by: Aaron Durbin --- util/romcc/romcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c index c2f5deed6c..4f267c2243 100644 --- a/util/romcc/romcc.c +++ b/util/romcc/romcc.c @@ -14250,7 +14250,7 @@ static void compute_closure_variables(struct compile_state *state, } /* Find the lowest unused index value */ for(index = 0; index < MAX_INDICIES; index++) { - if (!(used_indicies & (1 << index))) { + if (!(used_indicies & ((uint64_t)1 << index))) { break; } }