summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2014-10-16 10:43:54 +0000
committerjsing <>2014-10-16 10:43:54 +0000
commit51b2f5e80841bb6b000b8324a0a93349be43ac53 (patch)
treee255dc40be8478b1a20c2082eb423c72df7868fb /src
parent909247b30c58e971994251b7bf7092e9dd8967df (diff)
downloadopenbsd-51b2f5e80841bb6b000b8324a0a93349be43ac53.tar.gz
openbsd-51b2f5e80841bb6b000b8324a0a93349be43ac53.tar.bz2
openbsd-51b2f5e80841bb6b000b8324a0a93349be43ac53.zip
Repair BUF_strdup() breakage.
Diffstat (limited to 'src')
-rw-r--r--src/usr.bin/openssl/apps.c6
-rw-r--r--src/usr.bin/openssl/req.c4
2 files changed, 6 insertions, 4 deletions
diff --git a/src/usr.bin/openssl/apps.c b/src/usr.bin/openssl/apps.c
index c4ab7c8350..6ffdf3df1a 100644
--- a/src/usr.bin/openssl/apps.c
+++ b/src/usr.bin/openssl/apps.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: apps.c,v 1.10 2014/09/01 14:21:06 jsing Exp $ */ 1/* $OpenBSD: apps.c,v 1.11 2014/10/16 10:43:54 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -2107,7 +2107,9 @@ pkey_ctrl_string(EVP_PKEY_CTX *ctx, char *value)
2107 int rv; 2107 int rv;
2108 char *stmp, *vtmp = NULL; 2108 char *stmp, *vtmp = NULL;
2109 2109
2110 stmp = BUF_strdup(value); 2110 if (value == NULL)
2111 return -1;
2112 stmp = strdup(value);
2111 if (!stmp) 2113 if (!stmp)
2112 return -1; 2114 return -1;
2113 vtmp = strchr(stmp, ':'); 2115 vtmp = strchr(stmp, ':');
diff --git a/src/usr.bin/openssl/req.c b/src/usr.bin/openssl/req.c
index 99f10ecde0..1d50524052 100644
--- a/src/usr.bin/openssl/req.c
+++ b/src/usr.bin/openssl/req.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: req.c,v 1.3 2014/10/01 13:15:40 sthen Exp $ */ 1/* $OpenBSD: req.c,v 1.4 2014/10/16 10:43:54 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 *
@@ -1480,7 +1480,7 @@ set_keygen_ctx(BIO * err, const char *gstr, int *pkey_type,
1480 return NULL; 1480 return NULL;
1481 } 1481 }
1482 EVP_PKEY_asn1_get0_info(NULL, NULL, NULL, NULL, &anam, ameth); 1482 EVP_PKEY_asn1_get0_info(NULL, NULL, NULL, NULL, &anam, ameth);
1483 *palgnam = BUF_strdup(anam); 1483 *palgnam = strdup(anam);
1484#ifndef OPENSSL_NO_ENGINE 1484#ifndef OPENSSL_NO_ENGINE
1485 if (tmpeng) 1485 if (tmpeng)
1486 ENGINE_finish(tmpeng); 1486 ENGINE_finish(tmpeng);