UPSTREAM: util/romcc: Ensure that bit shift is valid

BUG=None
BRANCH=None
TEST=None

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>

Change-Id: Idbe147c1217f793b0360a752383203c658b0bdce
Reviewed-on: https://chromium-review.googlesource.com/425287
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Patrick Georgi 2017-01-02 21:24:50 +01:00 committed by chrome-bot
parent 707db62c59
commit 88a9311bae

View file

@ -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;
}
}