Replace a malloc() call with calloc()
authortb <tb@openbsd.org>
Tue, 9 Jul 2024 16:38:40 +0000 (16:38 +0000)
committertb <tb@openbsd.org>
Tue, 9 Jul 2024 16:38:40 +0000 (16:38 +0000)
lib/libcrypto/kdf/tls1_prf.c

index 2483cf9..ef81931 100644 (file)
@@ -273,7 +273,7 @@ static int tls1_prf_alg(const EVP_MD *md,
                          seed, seed_len, out, olen))
             return 0;
 
-        if ((tmp = malloc(olen)) == NULL) {
+        if ((tmp = calloc(1, olen)) == NULL) {
             KDFerror(ERR_R_MALLOC_FAILURE);
             return 0;
         }