]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/plugins/radius/avpair.c
Various fixes for errors found by coverity static analysis (#109)
[ppp.git] / pppd / plugins / radius / avpair.c
index 716d23f2efb7df7c9c059b1f592339c189730976..b22a0a2423dc3302c593508ffd5dd2565350792d 100644 (file)
@@ -121,7 +121,7 @@ VALUE_PAIR *rc_avpair_new (int attrid, void *pval, int len, int vendorcode)
                if ((vp = (VALUE_PAIR *) malloc (sizeof (VALUE_PAIR)))
                                                        != (VALUE_PAIR *) NULL)
                {
-                       strncpy (vp->name, pda->name, sizeof (vp->name));
+                       strlcpy (vp->name, pda->name, NAME_LENGTH);
                        vp->attribute = attrid;
                        vp->vendorcode = vendorcode;
                        vp->next = (VALUE_PAIR *) NULL;