merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 02d8696300eed7f3beda229d14ecc92903471bc0
parent ce8fb69687e3903065a8880f4f8df761ea1993a1
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon, 29 Jun 2026 00:20:13 +0200

fix bounds check

Diffstat:
Msrc/backend/taler-merchant-httpd_post-orders-ORDER_ID-pay.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_post-orders-ORDER_ID-pay.c b/src/backend/taler-merchant-httpd_post-orders-ORDER_ID-pay.c @@ -3315,11 +3315,10 @@ find_valid_input_tokens ( for (unsigned int j = 0; j < expected_num; j++) { - struct TokenUseConfirmation *tuc - = &pc->parse_pay.tokens[index + j]; + struct TokenUseConfirmation *tuc; const struct TALER_MERCHANT_ContractTokenFamilyKey *key = NULL; - if (index + j > pc->parse_pay.tokens_cnt) + if (index + j >= pc->parse_pay.tokens_cnt) { /* There are not a sufficient number of input tokens left to satisfy the request. Game over. */ @@ -3332,6 +3331,7 @@ find_valid_input_tokens ( NULL)); return GNUNET_NO; } + tuc = &pc->parse_pay.tokens[index + j]; for (unsigned int i = 0; i<family->keys_len; i++) {