summaryrefslogtreecommitdiff
path: root/lib/libssl
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2015-02-14 15:29:30 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2015-02-14 15:29:30 +0000
commite6ccf0fdc65608efccda8466f7a7fa46c455e4f8 (patch)
tree69ee9d899e1e90647580009c63718137715a38f4 /lib/libssl
parentaa9a4d1aa7c55b3cfaf3070a6badb4513cb4bd20 (diff)
Unchecked allocations in x509_name_canon().
ok doug@ jsing@
Diffstat (limited to 'lib/libssl')
-rw-r--r--lib/libssl/src/crypto/asn1/x_name.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libssl/src/crypto/asn1/x_name.c b/lib/libssl/src/crypto/asn1/x_name.c
index c7f47590887..51c5a0ae41e 100644
--- a/lib/libssl/src/crypto/asn1/x_name.c
+++ b/lib/libssl/src/crypto/asn1/x_name.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x_name.c,v 1.28 2015/02/14 15:25:08 jsing Exp $ */
+/* $OpenBSD: x_name.c,v 1.29 2015/02/14 15:29:29 miod Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -454,7 +454,11 @@ x509_name_canon(X509_NAME *a)
set = entry->set;
}
tmpentry = X509_NAME_ENTRY_new();
+ if (tmpentry == NULL)
+ goto err;
tmpentry->object = OBJ_dup(entry->object);
+ if (tmpentry->object == NULL)
+ goto err;
if (!asn1_string_canon(tmpentry->value, entry->value))
goto err;
if (!sk_X509_NAME_ENTRY_push(entries, tmpentry))