mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-24 18:18:13 +00:00
Change formatting of allocation check in x509_crl
This commit is contained in:
parent
cb5123fa86
commit
c9d6226d2c
1 changed files with 3 additions and 1 deletions
|
@ -296,7 +296,9 @@ int mbedtls_x509_crl_parse_der( mbedtls_x509_crl *chain,
|
||||||
*/
|
*/
|
||||||
if( buflen == 0 )
|
if( buflen == 0 )
|
||||||
return( MBEDTLS_ERR_X509_INVALID_FORMAT );
|
return( MBEDTLS_ERR_X509_INVALID_FORMAT );
|
||||||
else if( ( p = mbedtls_calloc( 1, buflen ) ) == NULL )
|
|
||||||
|
p = mbedtls_calloc( 1, buflen );
|
||||||
|
if( p == NULL )
|
||||||
return( MBEDTLS_ERR_X509_ALLOC_FAILED );
|
return( MBEDTLS_ERR_X509_ALLOC_FAILED );
|
||||||
|
|
||||||
memcpy( p, buf, buflen );
|
memcpy( p, buf, buflen );
|
||||||
|
|
Loading…
Reference in a new issue