From f17b3fd6d04fbe8987b6f6df8860cbc253df0a7e Mon Sep 17 00:00:00 2001 From: hasufell Date: Wed, 28 May 2014 19:42:08 +0200 Subject: [PATCH] ASCII->POLY: use malloc instead of calloc --- src/ascii_poly.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ascii_poly.c b/src/ascii_poly.c index db71c28..d06b982 100644 --- a/src/ascii_poly.c +++ b/src/ascii_poly.c @@ -126,10 +126,11 @@ get_bin_arr_to_ascii(char *binary_rep) i++; /* amount of real integers */ } - int_string = ntru_calloc(1, CHAR_SIZE * (i + 1)); + int_string = ntru_malloc(CHAR_SIZE * (i + 1)); for (uint32_t j = 0; j < i; j++) int_string[j] = (char) int_arr[j]; + int_string[i] = '\0'; free(int_arr);