From: deraadt Date: Sun, 20 Apr 2014 09:40:37 +0000 (+0000) Subject: Undo a calloc() replacement. It lacks the integer overflow check that X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a86afd2f81c2e61aa489d725f10b7f631c701105;p=openbsd Undo a calloc() replacement. It lacks the integer overflow check that the system one has. --- 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))