From 605e56925beeda0d184e24d6d923f973a336bcb7 Mon Sep 17 00:00:00 2001 From: Arturo Borrero Gonzalez Date: Wed, 10 Apr 2013 06:39:57 +0000 Subject: rule: fix snprintf XML output offset for rule. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Arturo Borrero González Signed-off-by: Pablo Neira Ayuso --- src/rule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rule.c b/src/rule.c index 3df1780..534526c 100644 --- a/src/rule.c +++ b/src/rule.c @@ -469,7 +469,7 @@ static int nft_rule_snprintf_xml(char *buf, size_t size, struct nft_rule *r, SNPRINTF_BUFFER_SIZE(ret, size, len, offset); } - ret = snprintf(buf+offset-1, len, "\n\n "); + ret = snprintf(buf+offset, len, "\n\n "); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); return ret; -- cgit v1.2.3