Allow CHAP passwords to work from radclient.
authoraland <aland>
Tue, 3 Sep 2002 14:14:35 +0000 (14:14 +0000)
committeraland <aland>
Tue, 3 Sep 2002 14:14:35 +0000 (14:14 +0000)
Patch from max liccardo

src/main/radclient.c

index c81f33d..188df87 100644 (file)
@@ -445,7 +445,7 @@ int main(int argc, char **argv)
                                
                        if (*password != '\0') {
                                if ((vp = pairfind(req->vps, PW_CHAP_PASSWORD)) != NULL) {
-                                       strNcpy((char *)vp->strvalue, password, vp->length + 1);
+                                       strNcpy((char *)vp->strvalue, password, strlen(password) + 1);
                                        vp->length = strlen(password);
                                        
                                        rad_chap_encode(req, (char *) vp->strvalue, req->id, vp);