Messages in this thread |  | | | Date | Fri, 28 Nov 2003 12:22:51 +0100 | | From | Jörn Engel <> | | Subject | Re: [PATCH 2.6]: IPv6: strcpy -> strlcpy |
| |
On Fri, 28 November 2003 09:40:22 +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote: > In article <20031128.092642.47232575.yoshfuji@linux-ipv6.org> (at Fri, 28 Nov 2003 09:26:42 +0900 (JST)), YOSHIFUJI Hideaki / ?$B5HF#1QL@ <yoshfuji@linux-ipv6.org> 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 - 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/
|  |