summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2014-04-20 09:40:37 +0000
committerderaadt <deraadt@openbsd.org>2014-04-20 09:40:37 +0000
commita86afd2f81c2e61aa489d725f10b7f631c701105 (patch)
treec2afef8d2ae3c9695aebeaa52342727d04ef6248 /lib/libssl/src
parentmove in_cksum_phdr from in.h (under #ifdef _KERNEL, at least) to ip_output.c (diff)
downloadwireguard-openbsd-a86afd2f81c2e61aa489d725f10b7f631c701105.tar.xz
wireguard-openbsd-a86afd2f81c2e61aa489d725f10b7f631c701105.zip
Undo a calloc() replacement. It lacks the integer overflow check that
the system one has.
Diffstat (limited to 'lib/libssl/src')
-rw-r--r--lib/libssl/src/ssl/kssl.c15
1 files changed, 1 insertions, 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))