mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-03 20:22:59 -05:00 
			
		
		
		
	Zeroize tmp buf on fail in load_file() dhm.c
This commit is contained in:
		
							parent
							
								
									5a1c0e7162
								
							
						
					
					
						commit
						bdbca7b383
					
				@ -542,7 +542,10 @@ static int load_file( const char *path, unsigned char **buf, size_t *n )
 | 
			
		||||
    if( fread( *buf, 1, *n, f ) != *n )
 | 
			
		||||
    {
 | 
			
		||||
        fclose( f );
 | 
			
		||||
 | 
			
		||||
        mbedtls_zeroize( *buf, *n + 1 );
 | 
			
		||||
        mbedtls_free( *buf );
 | 
			
		||||
 | 
			
		||||
        return( MBEDTLS_ERR_DHM_FILE_IO_ERROR );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user