From 75b3becf5b95c4ab5ddcef88b6565de716e5c230 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Tue, 13 Jan 2009 01:00:46 +0100 Subject: HWHDR: Fix size of allocated string. This patch fixes a incorrect computing of the allocation size of a string. --- filter/ulogd_filter_HWHDR.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filter/ulogd_filter_HWHDR.c b/filter/ulogd_filter_HWHDR.c index 33e8316..75a2a8f 100644 --- a/filter/ulogd_filter_HWHDR.c +++ b/filter/ulogd_filter_HWHDR.c @@ -117,7 +117,7 @@ static int parse_mac2str(struct ulogd_key *ret, unsigned char *mac, int i; if (len > 0) - mac_str = calloc(len/sizeof(char)*3, sizeof(char)); + mac_str = calloc(len/sizeof(char)*3 + 1, sizeof(char)); else mac_str = strdup(""); -- cgit v1.2.3