commit | ff13995812ce1d62e4bd3404b6af821ef92bc05f | [log] [tgz] |
---|---|---|
author | Andres Amaya Garcia <andres.amayagarcia@arm.com> | Wed Jul 12 10:38:12 2017 +0100 |
committer | Andres Amaya Garcia <andres.amayagarcia@arm.com> | Wed Jul 12 10:38:12 2017 +0100 |
tree | 03597a5de5f422f663814e05791098d528b35ba8 | |
parent | beb42837ac296459744780d5173be30d88f17316 [diff] [blame] |
Zeroize return buf on failure in pkparse.c
diff --git a/library/pkparse.c b/library/pkparse.c index 39c51f6..83c93ba 100644 --- a/library/pkparse.c +++ b/library/pkparse.c
@@ -98,7 +98,10 @@ if( fread( *buf, 1, *n, f ) != *n ) { fclose( f ); + + polarssl_zeroize( *buf, *n ); polarssl_free( *buf ); + return( POLARSSL_ERR_PK_FILE_IO_ERROR ); }