summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/apps/apps.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/apps/apps.c')
-rw-r--r--crypto/openssl/apps/apps.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/openssl/apps/apps.c b/crypto/openssl/apps/apps.c
index 2e77805..b1dd970 100644
--- a/crypto/openssl/apps/apps.c
+++ b/crypto/openssl/apps/apps.c
@@ -2442,7 +2442,11 @@ int bio_to_mem(unsigned char **out, int maxlen, BIO *in)
else
len = 1024;
len = BIO_read(in, tbuf, len);
- if (len <= 0)
+ if (len < 0) {
+ BIO_free(mem);
+ return -1;
+ }
+ if (len == 0)
break;
if (BIO_write(mem, tbuf, len) != len) {
BIO_free(mem);
@@ -2459,7 +2463,7 @@ int bio_to_mem(unsigned char **out, int maxlen, BIO *in)
return ret;
}
-int pkey_ctrl_string(EVP_PKEY_CTX *ctx, char *value)
+int pkey_ctrl_string(EVP_PKEY_CTX *ctx, const char *value)
{
int rv;
char *stmp, *vtmp = NULL;
OpenPOWER on IntegriCloud