exchange

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

commit 7e435ae20b6bb232aba438797a3e93487f79a5b0
parent 34e3f08898e8c4fe5e30853a77f2c856d247baaf
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon, 29 Jun 2026 23:10:17 +0200

fix off-by-one and add missing monotonicity assertion

Diffstat:
Msrc/auditor/taler-helper-auditor-purses.c | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/auditor/taler-helper-auditor-purses.c b/src/auditor/taler-helper-auditor-purses.c @@ -542,7 +542,8 @@ handle_purse_requested ( GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Handling purse request `%s'\n", TALER_B2S (purse_pub)); - TALER_ARL_USE_PP (purse_request_serial_id) = rowid; + GNUNET_assert (rowid >= TALER_ARL_USE_PP (purse_request_serial_id)); + TALER_ARL_USE_PP (purse_request_serial_id) = rowid + 1; if (GNUNET_OK != TALER_wallet_purse_create_verify (purse_expiration, h_contract_terms, @@ -1003,7 +1004,8 @@ handle_purse_decision ( struct TALER_Amount purse_fee; struct TALER_Amount balance_without_purse_fee; - TALER_ARL_USE_PP (purse_decision_serial_id) = rowid; + GNUNET_assert (rowid >= TALER_ARL_USE_PP (purse_decision_serial_id)); + TALER_ARL_USE_PP (purse_decision_serial_id) = rowid + 1; ps = setup_purse (pc, purse_pub); if (NULL == ps)