diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2023-12-14 18:16:14 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2023-12-14 18:16:14 +0000 |
commit | a42b219bc7a35190873f61184f173fdc568af907 (patch) | |
tree | 3d4944328789d0092c22c015fb8ee4ec0671a57c /lib/libcrypto/objects | |
parent | ba584e3780112418e055d7457bef3ca10f303124 (diff) |
OBJ_create: malloc() -> calloc()
Diffstat (limited to 'lib/libcrypto/objects')
-rw-r--r-- | lib/libcrypto/objects/obj_dat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcrypto/objects/obj_dat.c b/lib/libcrypto/objects/obj_dat.c index a2d3ff300cd..93c6e12cd30 100644 --- a/lib/libcrypto/objects/obj_dat.c +++ b/lib/libcrypto/objects/obj_dat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: obj_dat.c,v 1.77 2023/12/14 18:15:21 tb Exp $ */ +/* $OpenBSD: obj_dat.c,v 1.78 2023/12/14 18:16:13 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -597,7 +597,7 @@ OBJ_create(const char *oid, const char *sn, const char *ln) if ((len = a2d_ASN1_OBJECT(NULL, 0, oid, -1)) <= 0) goto err; - if ((buf = malloc(len)) == NULL) { + if ((buf = calloc(1, len)) == NULL) { OBJerror(ERR_R_MALLOC_FAILURE); goto err; } |