artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5caa395
)
OBJ_create: malloc() -> calloc()
author
tb
<tb@openbsd.org>
Thu, 14 Dec 2023 18:16:13 +0000
(18:16 +0000)
committer
tb
<tb@openbsd.org>
Thu, 14 Dec 2023 18:16:13 +0000
(18:16 +0000)
lib/libcrypto/objects/obj_dat.c
patch
|
blob
|
history
diff --git
a/lib/libcrypto/objects/obj_dat.c
b/lib/libcrypto/objects/obj_dat.c
index
a2d3ff3
..
93c6e12
100644
(file)
--- a/
lib/libcrypto/objects/obj_dat.c
+++ b/
lib/libcrypto/objects/obj_dat.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: obj_dat.c,v 1.7
7 2023/12/14 18:15:21
tb Exp $ */
+/* $OpenBSD: obj_dat.c,v 1.7
8 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;
}