diff options
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_eay.c')
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_eay.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_eay.c b/src/lib/libcrypto/rsa/rsa_eay.c index f8031c87a2..0eb18cf3c7 100644 --- a/src/lib/libcrypto/rsa/rsa_eay.c +++ b/src/lib/libcrypto/rsa/rsa_eay.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_eay.c,v 1.36 2014/10/18 17:20:40 jsing Exp $ */ | 1 | /* $OpenBSD: rsa_eay.c,v 1.37 2015/02/09 15:49:22 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -181,7 +181,7 @@ RSA_eay_public_encrypt(int flen, const unsigned char *from, unsigned char *to, | |||
181 | ret = BN_CTX_get(ctx); | 181 | ret = BN_CTX_get(ctx); |
182 | num = BN_num_bytes(rsa->n); | 182 | num = BN_num_bytes(rsa->n); |
183 | buf = malloc(num); | 183 | buf = malloc(num); |
184 | if (!f || !ret || !buf) { | 184 | if (f == NULL || ret == NULL || buf == NULL) { |
185 | RSAerr(RSA_F_RSA_EAY_PUBLIC_ENCRYPT, ERR_R_MALLOC_FAILURE); | 185 | RSAerr(RSA_F_RSA_EAY_PUBLIC_ENCRYPT, ERR_R_MALLOC_FAILURE); |
186 | goto err; | 186 | goto err; |
187 | } | 187 | } |
@@ -366,7 +366,7 @@ RSA_eay_private_encrypt(int flen, const unsigned char *from, unsigned char *to, | |||
366 | ret = BN_CTX_get(ctx); | 366 | ret = BN_CTX_get(ctx); |
367 | num = BN_num_bytes(rsa->n); | 367 | num = BN_num_bytes(rsa->n); |
368 | buf = malloc(num); | 368 | buf = malloc(num); |
369 | if (!f || !ret || !buf) { | 369 | if (f == NULL || ret == NULL || buf == NULL) { |
370 | RSAerr(RSA_F_RSA_EAY_PRIVATE_ENCRYPT, ERR_R_MALLOC_FAILURE); | 370 | RSAerr(RSA_F_RSA_EAY_PRIVATE_ENCRYPT, ERR_R_MALLOC_FAILURE); |
371 | goto err; | 371 | goto err; |
372 | } | 372 | } |