commit ecca5d98e76df0737a4ab09919709d4c85eb0610
parent 49317c7d1787ee7c5917490dd14eae04a9249f11
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Tue, 13 Jan 2026 07:22:54 +0900
fix #10862
Diffstat:
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/json/json_helper.c b/src/json/json_helper.c
@@ -249,6 +249,8 @@ TALER_JSON_spec_amount_any_array (const char *field,
GNUNET_assert (NULL != amounts_len);
GNUNET_assert (NULL != amounts);
+ *amounts = NULL;
+ *amounts_len = 0;
ctx = GNUNET_new (struct AmountArrayCtx);
ctx->len = amounts_len;
{
@@ -2162,7 +2164,8 @@ TALER_JSON_spec_array_of_data (
struct closure_array_of_data *cls;
GNUNET_assert (0< entry_size);
- GNUNET_assert (NULL != entries);
+ *entries = NULL;
+ *num_entries = 0;
cls = GNUNET_new (struct closure_array_of_data);
cls->num_entries = num_entries;
cls->entry_size = entry_size;
@@ -2186,6 +2189,8 @@ TALER_JSON_spec_array_of_denom_pub_h (
size_t *num_entries,
struct TALER_DenominationHashP **entries)
{
+ *num_entries = 0;
+ *entries = NULL;
return TALER_JSON_spec_array_of_data (
field,
sizeof (struct TALER_DenominationHashP),
@@ -2253,6 +2258,8 @@ TALER_JSON_spec_array_of_blinded_denom_sigs (
size_t num_entries,
struct TALER_BlindedDenominationSignature *entries)
{
+ for (size_t i = 0; i<num_entries; i++)
+ entries[i].blinded_sig = NULL;
struct GNUNET_JSON_Specification ret = {
.parser = &parse_array_of_blinded_denom_sigs,
.ptr = entries,