exchange

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

commit dc5c254690e11e259017ae37b4b54749c9438d68
parent 5d5220ecb2281ce2e1880b5e832a223ee670e049
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed, 30 Apr 2025 20:32:07 +0200

fix bad API causing use of uninitialized scalar

Diffstat:
Msrc/auditor/taler-helper-auditor-coins.c | 37+++++++++++++------------------------
1 file changed, 13 insertions(+), 24 deletions(-)

diff --git a/src/auditor/taler-helper-auditor-coins.c b/src/auditor/taler-helper-auditor-coins.c @@ -752,16 +752,15 @@ init_denomination (const struct TALER_DenominationHashP *denom_hash, * * @param cc our execution context * @param issue denomination key information for @a dh - * @param dh the denomination hash to use for the lookup * @return NULL on error */ static struct DenominationSummary * get_denomination_summary ( struct CoinContext *cc, - const struct TALER_EXCHANGEDB_DenominationKeyInformation *issue, - const struct TALER_DenominationHashP *dh) + const struct TALER_EXCHANGEDB_DenominationKeyInformation *issue) { struct DenominationSummary *ds; + const struct TALER_DenominationHashP *dh = &issue->denom_hash; ds = GNUNET_CONTAINER_multihashmap_get (cc->denom_summaries, &dh->hash); @@ -1027,7 +1026,6 @@ withdraw_cb (void *cls, for (size_t i=0; i < num_evs; i++) { struct DenominationSummary *ds; - struct TALER_DenominationHashP dh; const struct TALER_EXCHANGEDB_DenominationKeyInformation *issue; enum GNUNET_DB_QueryStatus qs; @@ -1053,8 +1051,7 @@ withdraw_cb (void *cls, return GNUNET_OK; } ds = get_denomination_summary (cc, - issue, - &dh); + issue); if (NULL == ds) { /* cc->qs is set by #get_denomination_summary() */ @@ -1064,11 +1061,11 @@ withdraw_cb (void *cls, ds->dcd.num_issued++; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Issued coin in denomination `%s' of total value %s\n", - GNUNET_h2s (&dh.hash), + GNUNET_h2s (&issue->denom_hash.hash), TALER_amount2s (&issue->value)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "New balance of denomination `%s' after withdraw is %s\n", - GNUNET_h2s (&dh.hash), + GNUNET_h2s (&issue->denom_hash.hash), TALER_amount2s (&ds->dcd.denom_balance)); TALER_ARL_amount_add (&TALER_ARL_USE_AB (total_escrowed), &TALER_ARL_USE_AB (total_escrowed), @@ -1565,8 +1562,7 @@ refresh_session_cb (void *cls, struct DenominationSummary *dsi; dsi = get_denomination_summary (cc, - ni, - &ni->denom_hash); + ni); if (NULL == dsi) { qs = report_row_inconsistency ("refresh_reveal", @@ -1609,8 +1605,7 @@ refresh_session_cb (void *cls, /* update old coin's denomination balance */ dso = get_denomination_summary (cc, - issue, - &issue->denom_hash); + issue); if (NULL == dso) { qs = report_row_inconsistency ("refresh_reveal", @@ -1786,8 +1781,7 @@ deposit_cb (void *cls, /* update old coin's denomination balance */ ds = get_denomination_summary (cc, - issue, - &issue->denom_hash); + issue); if (NULL == ds) { qs = report_row_inconsistency ("deposit", @@ -1941,8 +1935,7 @@ refund_cb (void *cls, /* update coin's denomination balance */ ds = get_denomination_summary (cc, - issue, - &issue->denom_hash); + issue); if (NULL == ds) { qs = report_row_inconsistency ("refund", @@ -2041,8 +2034,7 @@ purse_refund_coin_cb ( /* update coin's denomination balance */ ds = get_denomination_summary (cc, - issue, - &issue->denom_hash); + issue); if (NULL == ds) { qs = report_row_inconsistency ("purse-refund", @@ -2226,8 +2218,7 @@ check_recoup (struct CoinContext *cc, return GNUNET_SYSERR; } ds = get_denomination_summary (cc, - issue, - &issue->denom_hash); + issue); if (NULL == ds) { qs = report_row_inconsistency ("recoup", @@ -2413,8 +2404,7 @@ recoup_refresh_cb (void *cls, struct DenominationSummary *dso; dso = get_denomination_summary (cc, - issue, - old_denom_pub_hash); + issue); if (NULL == dso) { qs = report_row_inconsistency ("refresh_reveal", @@ -2662,8 +2652,7 @@ purse_deposit_cb ( /* update coin's denomination balance */ ds = get_denomination_summary (cc, - issue, - &issue->denom_hash); + issue); if (NULL == ds) { qs = report_row_inconsistency ("purse-deposit",