netdev
[Top] [All Lists]

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

To: David Roundy <droundy@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH 2.6]: IPv4: strcpy -> strlcpy
From: Felipe Alfaro Solana <felipe_alfaro@xxxxxxxxxxxxx>
Date: Thu, 27 Nov 2003 16:25:38 +0100
Cc: Linux Kernel Mailinglist <linux-kernel@xxxxxxxxxxxxxxx>, davem@xxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20031127142125.GG8276@xxxxxxxxxxxx>
References: <1069941882.1680.2.camel@xxxxxxxxxxxxxxxxxxxxxxxx> <20031127142125.GG8276@xxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Thu, 2003-11-27 at 15:21, David Roundy wrote:
> On Thu, Nov 27, 2003 at 03:04:42PM +0100, Felipe Alfaro Solana wrote:
> > diff -uNr linux-2.6.0-test11.orig/net/core/dev.c 
> > linux-2.6.0-test11/net/core/dev.c
> > +++ linux-2.6.0-test11/net/core/dev.c       2003-11-27 13:21:12.791315993 
> > +0100
> > @@ -335,7 +335,7 @@
> >     for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++) {
> >             if (s[i].name[0] == '\0' || s[i].name[0] == ' ') {
> >                     memset(s[i].name, 0, sizeof(s[i].name));
> > -                   strcpy(s[i].name, name);
> > +                   strlcpy(s[i].name, name, sizeof(s[i].map));
>                                                              ^^^
> I believe this should be name.

Yes, you're right. Sorry, my fault.
Corrected patch attached.
Thanks!

Attachment: strlcpy-ipv4.patch
Description: Text Data

<Prev in Thread] Current Thread [Next in Thread>