diff options
-rw-r--r-- | src/lib/libcrypto/objects/obj_dat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/objects/obj_dat.c b/src/lib/libcrypto/objects/obj_dat.c index a2d3ff300c..93c6e12cd3 100644 --- a/src/lib/libcrypto/objects/obj_dat.c +++ b/src/lib/libcrypto/objects/obj_dat.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: obj_dat.c,v 1.77 2023/12/14 18:15:21 tb Exp $ */ | 1 | /* $OpenBSD: obj_dat.c,v 1.78 2023/12/14 18:16:13 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -597,7 +597,7 @@ OBJ_create(const char *oid, const char *sn, const char *ln) | |||
597 | if ((len = a2d_ASN1_OBJECT(NULL, 0, oid, -1)) <= 0) | 597 | if ((len = a2d_ASN1_OBJECT(NULL, 0, oid, -1)) <= 0) |
598 | goto err; | 598 | goto err; |
599 | 599 | ||
600 | if ((buf = malloc(len)) == NULL) { | 600 | if ((buf = calloc(1, len)) == NULL) { |
601 | OBJerror(ERR_R_MALLOC_FAILURE); | 601 | OBJerror(ERR_R_MALLOC_FAILURE); |
602 | goto err; | 602 | goto err; |
603 | } | 603 | } |