]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
When appending a name, ensure that we append to the end of the list.
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Thu, 20 Feb 2014 12:06:01 +0000 (13:06 +0100)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Thu, 20 Feb 2014 12:06:01 +0000 (13:06 +0100)
lib/x509/name_constraints.c

index 3d899588a505bc815f326d57ca088d534367e48d..cf96d94535bd3ce072302bb254db7e4236861259 100644 (file)
@@ -61,7 +61,11 @@ static int extract_name_constraints(ASN1_TYPE c2, const char *vstr,
        unsigned int type;
        struct name_constraints_node_st *nc, *prev;
 
-       nc = prev = *_nc;
+       prev = *_nc;
+       if (prev != NULL) {
+               while(prev->next != NULL)
+                       prev = prev->next;
+       }
 
        do {
                indx++;