fixing memset size in zmap.c

This commit is contained in:
Zakir Durumeric 2013-09-02 12:49:47 -04:00
parent 473b96b1aa
commit 5652d2084b

View File

@ -47,7 +47,7 @@ pthread_mutex_t recv_ready_mutex = PTHREAD_MUTEX_INITIALIZER;
static void split_string(char* in, int *len, char***results) static void split_string(char* in, int *len, char***results)
{ {
char** fields = calloc(MAX_FIELDS, sizeof(char*)); char** fields = calloc(MAX_FIELDS, sizeof(char*));
memset(fields, 0, sizeof(fields)); memset(fields, 0, MAX_FIELDS*sizeof(fields));
int retvlen = 0; int retvlen = 0;
char *currloc = in; char *currloc = in;
// parse csv into a set of strings // parse csv into a set of strings