The branch, master has been updated via 9dc89798ebf s4:kdc/db-glue: Use realloc_p macro from f52ea1082bf s4:kdc:sdb_to_hdb key trust support
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 9dc89798ebf6cd3af3984bf3e909b2be739bc435 Author: Mike L <cl.jer...@gmail.com> Date: Tue Sep 16 11:17:25 2025 +0200 s4:kdc/db-glue: Use realloc_p macro Signed-off-by: Mike L. <cl.jer...@gmail.com> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> Autobuild-User(master): Volker Lendecke <v...@samba.org> Autobuild-Date(master): Wed Sep 17 13:19:25 UTC 2025 on atb-devel-224 ----------------------------------------------------------------------- Summary of changes: source4/kdc/db-glue.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/kdc/db-glue.c b/source4/kdc/db-glue.c index 6b95c2026ed..aecf51f2443 100644 --- a/source4/kdc/db-glue.c +++ b/source4/kdc/db-glue.c @@ -601,7 +601,7 @@ static krb5_error_code samba_kdc_merge_keys(struct sdb_keys *keys, num_old_keys = old_keys->len; total_keys = num_keys + num_old_keys; - skeys = realloc(keys->val, total_keys * sizeof keys->val[0]); + skeys = realloc_p(keys->val, struct sdb_key, total_keys); if (skeys == NULL) { return ENOMEM; } @@ -1418,9 +1418,9 @@ static krb5_error_code get_key_trust_public_keys(TALLOC_CTX *mem_ctx, goto pub_keys_oom; } } else { - pub_keys.keys = reallocarray(pub_keys.keys, - pub_keys.len + 1, - sizeof(pub_key)); + pub_keys.keys = realloc_p(pub_keys.keys, + struct sdb_pub_key, + pub_keys.len + 1); if (pub_keys.keys == NULL) { SAFE_FREE(pub_key.exponent.data); SAFE_FREE(pub_key.modulus.data); -- Samba Shared Repository