[NETFILTER]: nfnetlink_log: zero-terminate prefix
authorPatrick McHardy <kaber@trash.net>
Wed, 7 Mar 2007 04:24:35 +0000 (20:24 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 8 Mar 2007 00:08:02 +0000 (16:08 -0800)
Userspace expects a zero-terminated string, so include the trailing
zero in the netlink message.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netfilter/nfnetlink_log.c

index 91a0972ec117c1faefb72feca953653c40a7d80f..12f92e235a13359240559c63ec09a7476069c090 100644 (file)
@@ -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