From 62a9ad72ea2302af48df5e0ecd0c75538ca3f19a Mon Sep 17 00:00:00 2001 From: tb <> Date: Wed, 28 Aug 2024 15:48:33 +0000 Subject: def_create(): switch from malloc() to calloc() ok jsing --- src/lib/libcrypto/conf/conf_def.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/libcrypto/conf/conf_def.c b/src/lib/libcrypto/conf/conf_def.c index ef762b88e7..07f6eceaf1 100644 --- a/src/lib/libcrypto/conf/conf_def.c +++ b/src/lib/libcrypto/conf/conf_def.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf_def.c,v 1.36 2024/08/24 12:08:49 tb Exp $ */ +/* $OpenBSD: conf_def.c,v 1.37 2024/08/28 15:48:33 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -85,7 +85,7 @@ def_create(CONF_METHOD *meth) { CONF *ret; - ret = malloc(sizeof(CONF) + sizeof(unsigned short *)); + ret = calloc(1, sizeof(CONF) + sizeof(unsigned short *)); if (ret) if (meth->init(ret) == 0) { free(ret); -- cgit v1.2.3-55-g6feb