]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/plugins/radius/avpair.c
radius: Fix list traversal in rc_avpair_insert
[ppp.git] / pppd / plugins / radius / avpair.c
index 9b5c39cd42687694e62ee927390462c32aff96f2..bbe141d2d80acdc439307430c8916371c3e0e362 100644 (file)
@@ -426,7 +426,7 @@ void rc_avpair_insert (VALUE_PAIR **a, VALUE_PAIR *p, VALUE_PAIR *b)
        else /* look for the "p" entry in the "a" list (or run to end) */
        {
                this_node = *a;
-               while (this_node != (VALUE_PAIR *) NULL)
+               while (this_node->next != (VALUE_PAIR *) NULL)
                {
                        if (this_node == p)
                        {