mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-10-30 03:00:21 -04:00 
			
		
		
		
	Fix potential free of uninitialised pointer
A test was added in that could cause a jump to exit prior to initialisation of a pointer that would get freed if that test failed. Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
		
							parent
							
								
									3698fa1043
								
							
						
					
					
						commit
						e57dd2d450
					
				| @ -179,11 +179,12 @@ void rsa_pkcs1_sign_raw( data_t * hash_result, | ||||
|     mbedtls_test_rnd_pseudo_info rnd_info; | ||||
| 
 | ||||
|     mbedtls_rsa_init( &ctx ); | ||||
|     TEST_ASSERT( mbedtls_rsa_set_padding( &ctx, padding_mode, | ||||
|                                           MBEDTLS_MD_NONE ) == 0 ); | ||||
|     mbedtls_mpi_init( &N ); mbedtls_mpi_init( &P ); | ||||
|     mbedtls_mpi_init( &Q ); mbedtls_mpi_init( &E ); | ||||
| 
 | ||||
|     TEST_ASSERT( mbedtls_rsa_set_padding( &ctx, padding_mode, | ||||
|                                           MBEDTLS_MD_NONE ) == 0 ); | ||||
| 
 | ||||
|     memset( output, 0x00, sizeof( output ) ); | ||||
|     memset( &rnd_info, 0, sizeof( mbedtls_test_rnd_pseudo_info ) ); | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Paul Elliott
						Paul Elliott