From a86afd2f81c2e61aa489d725f10b7f631c701105 Mon Sep 17 00:00:00 2001 From: deraadt Date: Sun, 20 Apr 2014 09:40:37 +0000 Subject: [PATCH] Undo a calloc() replacement. It lacks the integer overflow check that the system one has. --- lib/libssl/src/ssl/kssl.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/lib/libssl/src/ssl/kssl.c b/lib/libssl/src/ssl/kssl.c index b71753c1912..26597f258e1 100644 --- a/lib/libssl/src/ssl/kssl.c +++ b/lib/libssl/src/ssl/kssl.c @@ -85,21 +85,8 @@ #endif -/* memory allocation functions for non-temporary storage - * (e.g. stuff that gets saved into the kssl context) */ -static void* -kssl_calloc(size_t nmemb, size_t size) -{ - void* p; - - p = malloc(nmemb*size); - if (p){ - memset(p, 0, nmemb*size); - } - return p; -} - #define kssl_malloc(size) malloc((size)) +#define kssl_calloc(nmemb, size) calloc(nmemb, size) #define kssl_realloc(ptr, size) realloc(ptr, size) #define kssl_free(ptr) free((ptr)) -- 2.20.1