From: Patrick McHardy Date: Wed, 7 Mar 2007 04:24:35 +0000 (-0800) Subject: [NETFILTER]: nfnetlink_log: zero-terminate prefix X-Git-Tag: v2.6.21-rc4~99^2~10 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=881dbfe8accc9434dd0d7d052505e3dca6ad9b3c;p=linux-2.6-omap-h63xx.git [NETFILTER]: nfnetlink_log: zero-terminate prefix Userspace expects a zero-terminated string, so include the trailing zero in the netlink message. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index 91a0972ec11..12f92e235a1 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c @@ -615,7 +615,7 @@ nfulnl_log_packet(unsigned int pf, plen = 0; if (prefix) - plen = strlen(prefix); + plen = strlen(prefix) + 1; /* all macros expand to constant values at compile time */ /* FIXME: do we want to make the size calculation conditional based on