summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2017-01-02 21:24:50 +0100
committerPatrick Georgi <pgeorgi@google.com>2017-01-03 22:18:06 +0100
commite7724f1e1a1788473243ce61fce1d1fc88623fb9 (patch)
treed9f4cd9de1cc3bd4f2a924b98f1eb070b397f644 /util
parentd05712529045e1694a834d57b0346c0b92a8735a (diff)
downloadcoreboot-e7724f1e1a1788473243ce61fce1d1fc88623fb9.tar.xz
util/romcc: Ensure that bit shift is valid
Change-Id: Idbe147c1217f793b0360a752383203c658b0bdce Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1287090 Reviewed-on: https://review.coreboot.org/18020 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'util')
-rw-r--r--util/romcc/romcc.c2
1 files changed, 1 insertions, 1 deletions
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;
}
}