netdev
[Top] [All Lists]

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

To: "YOSHIFUJI Hideaki / ?$B5HF#1QL@" <yoshfuji@xxxxxxxxxxxxxx>
Subject: Re: [PATCH 2.6]: IPv6: strcpy -> strlcpy
From: Jörn Engel <joern@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 28 Nov 2003 12:22:51 +0100
Cc: felipe_alfaro@xxxxxxxxxxxxx, rmk+lkml@xxxxxxxxxxxxxxxx, davem@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20031128.094022.106776635.yoshfuji@xxxxxxxxxxxxxx>
References: <1069974209.5349.7.camel@xxxxxxxxxxxxxxxxxxxxxxxx> <20031128.092326.39861126.yoshfuji@xxxxxxxxxxxxxx> <20031128.092642.47232575.yoshfuji@xxxxxxxxxxxxxx> <20031128.094022.106776635.yoshfuji@xxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.3.28i
On Fri, 28 November 2003 09:40:22 +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote:
> In article <20031128.092642.47232575.yoshfuji@xxxxxxxxxxxxxx> (at Fri, 28 Nov 
> 2003 09:26:42 +0900 (JST)), YOSHIFUJI Hideaki / ?$B5HF#1QL@ 
> <yoshfuji@xxxxxxxxxxxxxx> says:
> 
> > >  3)   if (len)
> > >          strncpy(dst, src, len - 1);
> > >       dst[len] = 0;
> 
> grr, another mistake...:
> 
>           if (len) {
>              strncpy(dst, src, len - 1);
>              dst[len - 1];
                           ^
>           }

Did you forget ' = 0' there? ;)

Jörn

-- 
ticks = jiffies;
while (ticks == jiffies);
ticks = jiffies;
-- /usr/src/linux/init/main.c


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