mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-10-30 19:20:40 -04:00 
			
		
		
		
	Zeroize buf if mbedtls_base64_decode() fails
This commit is contained in:
		
							parent
							
								
									d48ba2b336
								
							
						
					
					
						commit
						92d46f0246
					
				| @ -331,6 +331,7 @@ int mbedtls_pem_read_buffer( mbedtls_pem_context *ctx, const char *header, const | |||||||
| 
 | 
 | ||||||
|     if( ( ret = mbedtls_base64_decode( buf, len, &len, s1, s2 - s1 ) ) != 0 ) |     if( ( ret = mbedtls_base64_decode( buf, len, &len, s1, s2 - s1 ) ) != 0 ) | ||||||
|     { |     { | ||||||
|  |         mbedtls_zeroize( buf, len ); | ||||||
|         mbedtls_free( buf ); |         mbedtls_free( buf ); | ||||||
|         return( MBEDTLS_ERR_PEM_INVALID_DATA + ret ); |         return( MBEDTLS_ERR_PEM_INVALID_DATA + ret ); | ||||||
|     } |     } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Andres Amaya Garcia
						Andres Amaya Garcia