Fix memory leak.
authorFrantišek Bořánek <fboranek@kerio.com>
Thu, 29 May 2014 12:49:10 +0000 (13:49 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 29 May 2014 13:33:32 +0000 (14:33 +0100)
PR#3278

crypto/pkcs12/p12_kiss.c

index 206b1b0..c9b7ab6 100644 (file)
@@ -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);
                                OPENSSL_free(data);
                                if (!r)