From 5652d2084bd319c3e05cd5bae113e32db80a8611 Mon Sep 17 00:00:00 2001 From: Zakir Durumeric Date: Mon, 2 Sep 2013 12:49:47 -0400 Subject: [PATCH] fixing memset size in zmap.c --- src/zmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zmap.c b/src/zmap.c index cafb7a2..a3bfaa9 100644 --- a/src/zmap.c +++ b/src/zmap.c @@ -47,7 +47,7 @@ pthread_mutex_t recv_ready_mutex = PTHREAD_MUTEX_INITIALIZER; static void split_string(char* in, int *len, char***results) { char** fields = calloc(MAX_FIELDS, sizeof(char*)); - memset(fields, 0, sizeof(fields)); + memset(fields, 0, MAX_FIELDS*sizeof(fields)); int retvlen = 0; char *currloc = in; // parse csv into a set of strings