Fix DN parsing if last RDN has an empty value
authorTobias Brunner <tobias@strongswan.org>
Mon, 3 Jun 2013 13:53:46 +0000 (15:53 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 11 Jun 2013 09:03:12 +0000 (11:03 +0200)
src/libstrongswan/utils/identification.c

index 326ccf2..0cb7cb0 100644 (file)
@@ -418,7 +418,7 @@ static status_t atodn(char *src, chunk_t *dn)
                                {
                                        break;
                                }
-                               else if (*src != ',' && *src != '/')
+                               else if (*src != ',' && *src != '/' && *src != '\0')
                                {
                                        name.ptr = src;
                                        name.len = 1;