LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File ppp-2.4.4-strncatfix.patch of Package ppp (Project network)

--- ppp-2.4.4/pppd/plugins/radius/clientid.c.xx	2006-12-19 10:25:19.000000000 +0100
+++ ppp-2.4.4/pppd/plugins/radius/clientid.c	2006-12-19 10:25:45.000000000 +0100
@@ -110,7 +110,7 @@
 	if (*name != '/')
 		strcpy(ttyname, "/dev/");
 
-	strncat(ttyname, name, sizeof(ttyname));
+	strncat(ttyname, name, sizeof(ttyname)-strlen(ttyname)-1);
 
 	for(p = map2id_list; p; p = p->next)
 		if (!strcmp(ttyname, p->name)) return p->id;