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

From: Timo Kamph
Date: Thu Nov 27 2003 - 15:50:17 EST


On 27 Nov 2003 at 16:25, Felipe Alfaro Solana wrote:

> --- linux-2.6.0-test11.orig/net/ipv4/netfilter/ipchains_core.c 2003-11-26 21:45:26.000000000 +0100
> +++ linux-2.6.0-test11/net/ipv4/netfilter/ipchains_core.c 2003-11-27 13:28:39.884442527 +0100
> @@ -1173,7 +1173,7 @@
> = kmalloc(SIZEOF_STRUCT_IP_CHAIN, GFP_KERNEL);
> if (label == NULL)
> panic("Can't kmalloc for firewall chains.\n");
> - strcpy(label->label,name);
> + strlcpy(label->label, name, sizeof(label->name));
^^^^^^
I guess this shoud be label->label, or am I wrong?

Timo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/