]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
parsing error caused segfault in destroy()
authorAndreas Steffen <andreas@strongswan.org>
Sun, 13 Sep 2009 18:56:12 +0000 (20:56 +0200)
committerAndreas Steffen <andreas@strongswan.org>
Sun, 13 Sep 2009 18:56:12 +0000 (20:56 +0200)
src/libstrongswan/plugins/x509/x509_cert.c

index bfb3d1113299f9d9a58f05775ff041c5c0a9d511..108d7b29fe5d39891b5bbafa2b23305f7c65dfa5 100644 (file)
@@ -1463,9 +1463,9 @@ x509_cert_t *x509_cert_load(certificate_type_t type, va_list args)
                private_x509_cert_t *cert = create_empty();
 
                cert->encoding = chunk_clone(blob);
+               cert->parsed = TRUE;
                if (parse_certificate(cert))
                {
-                       cert->parsed = TRUE;
                        return &cert->public;
                }
                destroy(cert);