summaryrefslogtreecommitdiff
path: root/lib/libcrypto/objects
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcrypto/objects')
-rw-r--r--lib/libcrypto/objects/o_names.c3
-rw-r--r--lib/libcrypto/objects/obj_xref.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/libcrypto/objects/o_names.c b/lib/libcrypto/objects/o_names.c
index 196d3ab0a75..169b8ae87da 100644
--- a/lib/libcrypto/objects/o_names.c
+++ b/lib/libcrypto/objects/o_names.c
@@ -292,7 +292,8 @@ OBJ_NAME_do_all_sorted(int type, void (*fn)(const OBJ_NAME *, void *arg),
int n;
d.type = type;
- d.names = malloc(lh_OBJ_NAME_num_items(names_lh)*sizeof *d.names);
+ d.names = reallocarray(NULL, lh_OBJ_NAME_num_items(names_lh),
+ sizeof *d.names);
d.n = 0;
OBJ_NAME_do_all(type, do_all_sorted_fn, &d);
diff --git a/lib/libcrypto/objects/obj_xref.c b/lib/libcrypto/objects/obj_xref.c
index 25aed74ff11..8e9128efc4b 100644
--- a/lib/libcrypto/objects/obj_xref.c
+++ b/lib/libcrypto/objects/obj_xref.c
@@ -164,7 +164,7 @@ OBJ_add_sigid(int signid, int dig_id, int pkey_id)
sigx_app = sk_nid_triple_new(sigx_cmp);
if (!sigx_app)
return 0;
- ntr = malloc(sizeof(int) * 3);
+ ntr = reallocarray(NULL, sizeof(int), 3);
if (!ntr)
return 0;
ntr->sign_id = signid;