requested by jsing on review
-/* $OpenBSD: x509_conf.c,v 1.10 2024/06/18 05:34:09 tb Exp $ */
+/* $OpenBSD: x509_conf.c,v 1.11 2024/06/18 05:35:30 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 1999.
*/
if ((ext_len = method->i2d(ext_struc, NULL)) <= 0)
goto merr;
- if ((ext_der = malloc(ext_len)) == NULL)
+ if ((ext_der = calloc(1, ext_len)) == NULL)
goto merr;
p = ext_der;
if (method->i2d(ext_struc, &p) != ext_len)