mirror of https://github.com/openssl/openssl.git
				
				
				
			test/v3nametest.c: Add check for OPENSSL_malloc
As the potential failure of the OPENSSL_malloc(),
it should be better to add the check and return
error if fails.
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18573)
(cherry picked from commit b147b9daf1)
			
			
This commit is contained in:
		
							parent
							
								
									6408e7cf8a
								
							
						
					
					
						commit
						3cb3708c2b
					
				|  | @ -288,6 +288,8 @@ static int run_cert(X509 *crt, const char *nameincert, | |||
|         char *name = OPENSSL_malloc(namelen + 1); | ||||
|         int match, ret; | ||||
| 
 | ||||
|         if (!TEST_ptr(name)) | ||||
|             return 0; | ||||
|         memcpy(name, *pname, namelen + 1); | ||||
| 
 | ||||
|         match = -1; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue