exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 186c80a743fd0196d9476db59a1dd34a056a01ba
parent e5088f85ad6107247a68f93275f8d2c2f73b9dc5
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Wed, 15 Jul 2026 18:04:53 +0200

-fix bugs

Diffstat:
Msrc/exchangedb/lookup_aml_history.c | 2+-
Msrc/util/secmod_cs.c | 45++++++++++++++++++++++++---------------------
2 files changed, 25 insertions(+), 22 deletions(-)

diff --git a/src/exchangedb/lookup_aml_history.c b/src/exchangedb/lookup_aml_history.c @@ -73,7 +73,7 @@ handle_aml_entry (void *cls, struct GNUNET_TIME_Timestamp decision_time; char *justification; struct TALER_AmlOfficerPublicKeyP decider_pub; - json_t *jproperties; + json_t *jproperties = NULL; json_t *jnew_rules = NULL; bool to_investigate; bool is_active; diff --git a/src/util/secmod_cs.c b/src/util/secmod_cs.c @@ -988,7 +988,6 @@ handle_batch_derive_request (struct TES_Client *client, uint16_t size = ntohs (bdr->header.size) - sizeof (*bdr); const void *off = (const void *) &bdr[1]; unsigned int idx = 0; - struct BatchJob jobs[bs]; bool failure = false; GNUNET_log (GNUNET_ERROR_TYPE_INFO, @@ -999,30 +998,34 @@ handle_batch_derive_request (struct TES_Client *client, GNUNET_break_op (0); return GNUNET_SYSERR; } - while ( (idx < bs) && - (size >= sizeof (struct TALER_CRYPTO_CsRDeriveRequest)) ) { - const struct TALER_CRYPTO_CsRDeriveRequest *rdr = off; - uint16_t s = ntohs (rdr->header.size); + struct BatchJob jobs[GNUNET_NZL (bs)]; - if ( (s > size) || - (s != sizeof (*rdr)) ) + while ( (idx < bs) && + (size >= sizeof (struct TALER_CRYPTO_CsRDeriveRequest)) ) { - failure = true; - bs = idx; - break; + const struct TALER_CRYPTO_CsRDeriveRequest *rdr = off; + uint16_t s = ntohs (rdr->header.size); + + if ( (s > size) || + (s != sizeof (*rdr)) ) + { + failure = true; + bs = idx; + break; + } + start_derive_job (rdr, + &jobs[idx++]); + off += s; + size -= s; } - start_derive_job (rdr, - &jobs[idx++]); - off += s; - size -= s; - } - GNUNET_break_op (0 == size); - bs = GNUNET_MIN (bs, - idx); - for (unsigned int i = 0; i<bs; i++) - finish_job (client, - &jobs[i]); + GNUNET_break_op (0 == size); + bs = GNUNET_MIN (bs, + idx); + for (unsigned int i = 0; i<bs; i++) + finish_job (client, + &jobs[i]); + } if (failure) { GNUNET_break (0);