From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 18 Nov 2026 16:01:54 +0100 Subject: [PATCH] libexchange: keep the auditor array size when copying the previous /keys With auditors_size left at 0, merging a new auditor skipped the grow and failed the capacity assertion. Issue: https://bugs.taler.net/n/12191 Assisted by LLM --- src/lib/exchange_api_get-keys.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/exchange_api_get-keys.c b/src/lib/exchange_api_get-keys.c index f4765f024..7f31fe713 100644 --- a/src/lib/exchange_api_get-keys.c +++ b/src/lib/exchange_api_get-keys.c @@ -321,8 +321,9 @@ keys_completed_cb (void *cls, TALER_denom_pub_copy (&kd->denom_keys[i].key, &kd_old->denom_keys[i].key); kd->num_auditors = kd_old->num_auditors; + kd->auditors_size = kd_old->num_auditors; kd->auditors - = GNUNET_new_array (kd->num_auditors, + = GNUNET_new_array (kd->auditors_size, struct TALER_EXCHANGE_AuditorInformation); /* Now the necessary deep copy... */ for (unsigned int i = 0; inum_auditors; i++) -- 2.47.3