Thread (4 messages) 4 messages, 3 authors, 2003-11-27

Re: [PATCH 2.6]: IPv6: strcpy -> strlcpy

flat view

From: YOSHIFUJI Hideaki / 吉藤英明 <hidden>
Date: 2003-11-27 08:33:24
Also in: lkml

In article [off-list ref] (at Thu, 27 Nov 2003 09:14:44 +0100), Felipe Alfaro Solana [off-list ref] says:
Attached is a patch against 2.6.0-test11 to convert all strcpy() calls
to their corresponding strlcpy() for IPv6. Compiled and tested.
I don't like this coding style.

diff -uNr linux-2.6.0-test11.orig/net/ipv6/ip6_tunnel.c linux-2.6.0-test11/net/ipv6/ip6_tunnel.c
--- linux-2.6.0-test11.orig/net/ipv6/ip6_tunnel.c	2003-11-26 21:42:56.000000000 +0100
+++ linux-2.6.0-test11/net/ipv6/ip6_tunnel.c	2003-11-27 00:27:09.000000000 +0100
-	strcpy(t->parms.name, dev->name);
+	strlcpy(t->parms.name, dev->name, IFNAMSIZ);
                                          sizeof(t->parms.name)
or something like that.

--yoshfuji
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help