Thread (7 messages) 7 messages, 4 authors, 2003-11-28

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

From: Jörn Engel <hidden>
Date: 2003-11-28 11:24:04
Also in: lkml

Possibly related (same subject, not in this thread)

On Fri, 28 November 2003 09:40:22 +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote:
In article [ref] (at Fri, 28 Nov 2003 09:26:42 +0900 (JST)), YOSHIFUJI Hideaki / ?$B5HF#1QL@ [off-list ref] says:
quoted
quoted
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help