summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2014-10-16 10:43:55 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2014-10-16 10:43:55 +0000
commit3234ff7afdb1e0c3c06a86574e5f60236ccfa34b (patch)
tree89c366b81f0ae7b62273a03a95f97ca55e7f16e3 /usr.bin
parent2423ac1cb3f0d425772710ab4c939e2eaacef497 (diff)
Repair BUF_strdup() breakage.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/openssl/apps.c6
-rw-r--r--usr.bin/openssl/req.c4
2 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/openssl/apps.c b/usr.bin/openssl/apps.c
index c4ab7c8350c..6ffdf3df1a5 100644
--- a/usr.bin/openssl/apps.c
+++ b/usr.bin/openssl/apps.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apps.c,v 1.10 2014/09/01 14:21:06 jsing Exp $ */
+/* $OpenBSD: apps.c,v 1.11 2014/10/16 10:43:54 jsing Exp $ */
/*
* Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
*
@@ -2107,7 +2107,9 @@ pkey_ctrl_string(EVP_PKEY_CTX *ctx, char *value)
int rv;
char *stmp, *vtmp = NULL;
- stmp = BUF_strdup(value);
+ if (value == NULL)
+ return -1;
+ stmp = strdup(value);
if (!stmp)
return -1;
vtmp = strchr(stmp, ':');
diff --git a/usr.bin/openssl/req.c b/usr.bin/openssl/req.c
index 99f10ecde0b..1d505240522 100644
--- a/usr.bin/openssl/req.c
+++ b/usr.bin/openssl/req.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: req.c,v 1.3 2014/10/01 13:15:40 sthen Exp $ */
+/* $OpenBSD: req.c,v 1.4 2014/10/16 10:43:54 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1480,7 +1480,7 @@ set_keygen_ctx(BIO * err, const char *gstr, int *pkey_type,
return NULL;
}
EVP_PKEY_asn1_get0_info(NULL, NULL, NULL, NULL, &anam, ameth);
- *palgnam = BUF_strdup(anam);
+ *palgnam = strdup(anam);
#ifndef OPENSSL_NO_ENGINE
if (tmpeng)
ENGINE_finish(tmpeng);