[patch 10/20] nfnetlink_log: zero-terminate prefix

From: Greg KH
Date: Sat Mar 10 2007 - 01:25:42 EST


-stable review patch. If anyone has any objections, please let us know.

------------------
From: Patrick McHardy <kaber@xxxxxxxxx>

[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@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
net/netfilter/nfnetlink_log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -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

--
-
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/