mirror of
				https://github.com/brmlab/osmo-tetra.git
				synced 2025-10-31 15:33:59 +01:00 
			
		
		
		
	tetra_mac_pdu: Prevent array overflow of addr_len_by_type[]
detected by Smatch
This commit is contained in:
		
							parent
							
								
									6d7b343149
								
							
						
					
					
						commit
						abc2eb2b97
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		|  | @ -193,6 +193,9 @@ int macpdu_decode_resource(struct tetra_resrc_decoded *rsd, const uint8_t *bits) | |||
| 		rsd->addr.ssi = bits_to_uint(cur, 24); | ||||
| 		rsd->addr.usage_marker = bits_to_uint(cur, 6); | ||||
| 		break; | ||||
| 	default: | ||||
| 		return -EINVAL; | ||||
| 		break; | ||||
| 	} | ||||
| 	cur += addr_len_by_type[rsd->addr.type]; | ||||
| 	/* no intermediate napping in pi/4 */ | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Harald Welte
						Harald Welte