Messages in this thread | | | Date | Fri, 28 Nov 2003 11:05:25 +0900 (JST) | Subject | Re: [PATCH 2.6]: IPv4: strcpy -> strlcpy | From | YOSHIFUJI Hideaki / 吉藤英明 <> |
| |
In article <1069970946.2138.13.camel@teapot.felipe-alfaro.com> (at Thu, 27 Nov 2003 23:09:06 +0100), Felipe Alfaro Solana <felipe_alfaro@linuxmail.org> says:
> diff -uNr linux-2.6.0-test11.orig/net/ipv4/ipconfig.c linux-2.6.0-test11/net/ipv4/ipconfig.c > --- linux-2.6.0-test11.orig/net/ipv4/ipconfig.c 2003-11-26 21:42:55.000000000 +0100 > +++ linux-2.6.0-test11/net/ipv4/ipconfig.c 2003-11-27 13:32:06.904650818 +0100 > @@ -299,7 +299,7 @@ > int err; > > memset(&ir, 0, sizeof(ir)); > - strcpy(ir.ifr_ifrn.ifrn_name, ic_dev->name); > + strlcpy(ir.ifr_ifrn.ifrn_name, ic_dev->name, sizeof(ir.ifr_ifrn.ifrn_name));
please use strlcpy(ir.ifr_name, ic_dev->name, sizeof(ir.ifr_name)); instead.
--yoshfuji - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |