diff options
Diffstat (limited to 'src/lib/libcrypto/objects')
-rw-r--r-- | src/lib/libcrypto/objects/o_names.c | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/obj_xref.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libcrypto/objects/o_names.c b/src/lib/libcrypto/objects/o_names.c index 196d3ab0a7..169b8ae87d 100644 --- a/src/lib/libcrypto/objects/o_names.c +++ b/src/lib/libcrypto/objects/o_names.c | |||
@@ -292,7 +292,8 @@ OBJ_NAME_do_all_sorted(int type, void (*fn)(const OBJ_NAME *, void *arg), | |||
292 | int n; | 292 | int n; |
293 | 293 | ||
294 | d.type = type; | 294 | d.type = type; |
295 | d.names = malloc(lh_OBJ_NAME_num_items(names_lh)*sizeof *d.names); | 295 | d.names = reallocarray(NULL, lh_OBJ_NAME_num_items(names_lh), |
296 | sizeof *d.names); | ||
296 | d.n = 0; | 297 | d.n = 0; |
297 | OBJ_NAME_do_all(type, do_all_sorted_fn, &d); | 298 | OBJ_NAME_do_all(type, do_all_sorted_fn, &d); |
298 | 299 | ||
diff --git a/src/lib/libcrypto/objects/obj_xref.c b/src/lib/libcrypto/objects/obj_xref.c index 25aed74ff1..8e9128efc4 100644 --- a/src/lib/libcrypto/objects/obj_xref.c +++ b/src/lib/libcrypto/objects/obj_xref.c | |||
@@ -164,7 +164,7 @@ OBJ_add_sigid(int signid, int dig_id, int pkey_id) | |||
164 | sigx_app = sk_nid_triple_new(sigx_cmp); | 164 | sigx_app = sk_nid_triple_new(sigx_cmp); |
165 | if (!sigx_app) | 165 | if (!sigx_app) |
166 | return 0; | 166 | return 0; |
167 | ntr = malloc(sizeof(int) * 3); | 167 | ntr = reallocarray(NULL, sizeof(int), 3); |
168 | if (!ntr) | 168 | if (!ntr) |
169 | return 0; | 169 | return 0; |
170 | ntr->sign_id = signid; | 170 | ntr->sign_id = signid; |