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>
This commit is contained in:
		
				
					committed by
					
						
						Patrick Georgi
					
				
			
			
				
	
			
			
			
						parent
						
							d057125290
						
					
				
				
					commit
					e7724f1e1a
				
			@@ -14250,7 +14250,7 @@ static void compute_closure_variables(struct compile_state *state,
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
		/* Find the lowest unused index value */
 | 
							/* Find the lowest unused index value */
 | 
				
			||||||
		for(index = 0; index < MAX_INDICIES; index++) {
 | 
							for(index = 0; index < MAX_INDICIES; index++) {
 | 
				
			||||||
			if (!(used_indicies & (1 << index))) {
 | 
								if (!(used_indicies & ((uint64_t)1 << index))) {
 | 
				
			||||||
				break;
 | 
									break;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user