mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 16:54:21 +00:00 
			
		
		
		
	mtd: intflmount: fix off by one error in INFTL_dumpVUchains()
The ->PUtable[] array has "->nb_blocks" number of elemetns so this comparison should be ">=" instead of ">". Otherwise it could result in a minor read beyond the end of an array. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
This commit is contained in:
		
							parent
							
								
									f02985b785
								
							
						
					
					
						commit
						e8e6c87565
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -518,7 +518,7 @@ void INFTL_dumpVUchains(struct INFTLrecord *s) | |||
| 	pr_debug("INFTL Virtual Unit Chains:\n"); | ||||
| 	for (logical = 0; logical < s->nb_blocks; logical++) { | ||||
| 		block = s->VUtable[logical]; | ||||
| 		if (block > s->nb_blocks) | ||||
| 		if (block >= s->nb_blocks) | ||||
| 			continue; | ||||
| 		pr_debug("  LOGICAL %d --> %d ", logical, block); | ||||
| 		for (i = 0; i < s->nb_blocks; i++) { | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Dan Carpenter
						Dan Carpenter