From e7724f1e1a1788473243ce61fce1d1fc88623fb9 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Mon, 2 Jan 2017 21:24:50 +0100 Subject: util/romcc: Ensure that bit shift is valid Change-Id: Idbe147c1217f793b0360a752383203c658b0bdce 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 --- 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 c2f5deed6cbd..4f267c2243ca 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; } } -- cgit v1.2.3