mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-10-30 03:00:21 -04:00 
			
		
		
		
	Fix bug in get_pkcs_padding(): cannot be 0-length
This commit is contained in:
		
							parent
							
								
									a640849b55
								
							
						
					
					
						commit
						b7d24bc7ca
					
				| @ -546,7 +546,7 @@ static int get_pkcs_padding( unsigned char *input, size_t input_len, | |||||||
| 
 | 
 | ||||||
|     padding_len = input[input_len - 1]; |     padding_len = input[input_len - 1]; | ||||||
| 
 | 
 | ||||||
|     if( padding_len > input_len ) |     if( padding_len > input_len || padding_len == 0 ) | ||||||
|         return POLARSSL_ERR_CIPHER_INVALID_PADDING; |         return POLARSSL_ERR_CIPHER_INVALID_PADDING; | ||||||
| 
 | 
 | ||||||
|     for( i = input_len - padding_len; i < input_len; i++ ) |     for( i = input_len - padding_len; i < input_len; i++ ) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Manuel Pégourié-Gonnard
						Manuel Pégourié-Gonnard