]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
nfnetlink_log: zero-terminate prefix
authorPatrick McHardy <kaber@trash.net>
Wed, 7 Mar 2007 21:34:43 +0000 (22:34 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 13 Mar 2007 18:26:46 +0000 (11:26 -0700)
[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 <kaber@trash.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/netfilter/nfnetlink_log.c

index 5c2980d07b7f7829aa10ca6c6e4e2963f86b6170..53c0ed2803f1586cbe9e5e71adf6b3284eed986c 100644 (file)
@@ -620,7 +620,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