Fixed possible segmentation fault.
authorTobias Brunner <tobias@strongswan.org>
Tue, 21 Sep 2010 12:32:14 +0000 (14:32 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 14 Oct 2010 15:36:18 +0000 (17:36 +0200)
src/libstrongswan/credentials/sets/mem_cred.c

index ca3ee36..f1d40dd 100644 (file)
@@ -90,7 +90,7 @@ static bool certs_filter(cert_data_t *data, certificate_t **in, certificate_t **
                {
                        if (data->key == KEY_ANY || data->key == public->get_type(public))
                        {
-                               if (public->has_fingerprint(public,
+                               if (data->id && public->has_fingerprint(public,
                                                                                        data->id->get_encoding(data->id)))
                                {
                                        public->destroy(public);