summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Leblond <eric@inl.fr>2009-01-13 01:00:46 +0100
committerEric Leblond <eric@inl.fr>2009-01-13 08:21:44 +0100
commit75b3becf5b95c4ab5ddcef88b6565de716e5c230 (patch)
tree17992433d875eff44dfc1ff65d1c0c4b28c3110a
parentde384e6f16d67eb21c555793368be4cb47fced98 (diff)
HWHDR: Fix size of allocated string.
This patch fixes a incorrect computing of the allocation size of a string.
-rw-r--r--filter/ulogd_filter_HWHDR.c2
1 files changed, 1 insertions, 1 deletions
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("");