linux-ppp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/9] radius: fix compiler warning
@ 2019-09-26  7:20 Kurt Van Dijck
  0 siblings, 0 replies; only message in thread
From: Kurt Van Dijck @ 2019-09-26  7:20 UTC (permalink / raw)
  To: linux-ppp

Signed-off-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
---
 pppd/plugins/radius/clientid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pppd/plugins/radius/clientid.c b/pppd/plugins/radius/clientid.c
index d49579c..09ec3d0 100644
--- a/pppd/plugins/radius/clientid.c
+++ b/pppd/plugins/radius/clientid.c
@@ -110,7 +110,7 @@ UINT4 rc_map2id(char *name)
 	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;
-- 
1.8.5.rc3

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-26  7:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-26  7:20 [PATCH 2/9] radius: fix compiler warning Kurt Van Dijck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).