summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src
diff options
context:
space:
mode:
authorlogan <logan@openbsd.org>2014-06-04 20:04:55 +0000
committerlogan <logan@openbsd.org>2014-06-04 20:04:55 +0000
commitd8bfa24e85b6d0a98559e270fe37ea8d6788abc2 (patch)
tree347dd39ae41ff5dc3d2ad4f360e57d8f86ca7e66 /lib/libssl/src
parentIn fusefs_unmount() we need to send the FBT_DESTROY fusebuf only if (diff)
downloadwireguard-openbsd-d8bfa24e85b6d0a98559e270fe37ea8d6788abc2.tar.xz
wireguard-openbsd-d8bfa24e85b6d0a98559e270fe37ea8d6788abc2.zip
Fix a leak that can occur when len == 0, and as a result we leak a \0 byte.
(From Frantisek Boranek) OK from miod@
Diffstat (limited to 'lib/libssl/src')
-rw-r--r--lib/libssl/src/crypto/pkcs12/p12_kiss.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libssl/src/crypto/pkcs12/p12_kiss.c b/lib/libssl/src/crypto/pkcs12/p12_kiss.c
index bc1fcff45df..cfefc6aaac4 100644
--- a/lib/libssl/src/crypto/pkcs12/p12_kiss.c
+++ b/lib/libssl/src/crypto/pkcs12/p12_kiss.c
@@ -269,7 +269,7 @@ static int parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen,
int len, r;
unsigned char *data;
len = ASN1_STRING_to_UTF8(&data, fname);
- if(len > 0) {
+ if(len >= 0) {
r = X509_alias_set1(x509, data, len);
free(data);
if (!r)