diff options
author | 2015-02-14 15:29:29 +0000 | |
---|---|---|
committer | 2015-02-14 15:29:29 +0000 | |
commit | 00f4980695722d281fa2a938024dcfa11b763b17 (patch) | |
tree | 009b6b65fa88fd19029c3d0a96da0e767fa8c567 /lib/libssl/src | |
parent | Memory leak upon error in X509_add1_{trust,reject}_object. (diff) | |
download | wireguard-openbsd-00f4980695722d281fa2a938024dcfa11b763b17.tar.xz wireguard-openbsd-00f4980695722d281fa2a938024dcfa11b763b17.zip |
Unchecked allocations in x509_name_canon().
ok doug@ jsing@
Diffstat (limited to 'lib/libssl/src')
-rw-r--r-- | lib/libssl/src/crypto/asn1/x_name.c | 6 |
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)) |