From 4c102f22bdff829e109fbff140d68fdc9814038b Mon Sep 17 00:00:00 2001 From: Nicholas Niro Date: Thu, 18 Jun 2015 01:45:14 -0400 Subject: [PATCH] concept/mproof: Fixed an old minor bug in the concept. --- concept/mproof.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/concept/mproof.c b/concept/mproof.c index 1d7350e..c92762a 100755 --- a/concept/mproof.c +++ b/concept/mproof.c @@ -111,7 +111,7 @@ fillData(DBBUFFER *eng, unsigned int number, char *message) tmp = (Pdata***)&eng->buffer; (*tmp)[num]->number = number; - (*tmp)[num]->message = (char*)calloc(1, strlen(message)); + (*tmp)[num]->message = (char*)calloc(1, strlen(message) + 1); strncpy((*tmp)[num]->message, message, strlen(message)); } @@ -125,7 +125,7 @@ fillList(DBBUFFER *eng, unsigned int number, char *name, unsigned short age, uns num = eng->total - 1; tmp = (Plist***)&eng->buffer; - (*tmp)[num]->name = (char*)calloc(1, strlen(name)); + (*tmp)[num]->name = (char*)calloc(1, strlen(name) + 1); strncpy((*tmp)[num]->name, name, strlen(name)); /* printf("added the elem %s to the List\n", (*tmp)[num]->name); */ (*tmp)[num]->number = number; -- 2.11.4.GIT