summaryrefslogtreecommitdiff
path: root/lib/libcrypto/rsa/rsa_eay.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcrypto/rsa/rsa_eay.c')
-rw-r--r--lib/libcrypto/rsa/rsa_eay.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libcrypto/rsa/rsa_eay.c b/lib/libcrypto/rsa/rsa_eay.c
index f8031c87a27..0eb18cf3c79 100644
--- a/lib/libcrypto/rsa/rsa_eay.c
+++ b/lib/libcrypto/rsa/rsa_eay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsa_eay.c,v 1.36 2014/10/18 17:20:40 jsing Exp $ */
+/* $OpenBSD: rsa_eay.c,v 1.37 2015/02/09 15:49:22 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -181,7 +181,7 @@ RSA_eay_public_encrypt(int flen, const unsigned char *from, unsigned char *to,
ret = BN_CTX_get(ctx);
num = BN_num_bytes(rsa->n);
buf = malloc(num);
- if (!f || !ret || !buf) {
+ if (f == NULL || ret == NULL || buf == NULL) {
RSAerr(RSA_F_RSA_EAY_PUBLIC_ENCRYPT, ERR_R_MALLOC_FAILURE);
goto err;
}
@@ -366,7 +366,7 @@ RSA_eay_private_encrypt(int flen, const unsigned char *from, unsigned char *to,
ret = BN_CTX_get(ctx);
num = BN_num_bytes(rsa->n);
buf = malloc(num);
- if (!f || !ret || !buf) {
+ if (f == NULL || ret == NULL || buf == NULL) {
RSAerr(RSA_F_RSA_EAY_PRIVATE_ENCRYPT, ERR_R_MALLOC_FAILURE);
goto err;
}