exchange

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

commit 1faad976de02bc72ca1d27352e0a6fbd4e083ec7
parent 277a535a0405c1c992badd4e75a0ddde07170871
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Mon, 17 Aug 2026 17:10:43 +0200

reject over-sized replies

Diffstat:
Msrc/exchange/taler-exchange-wirewatch.c | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/exchange/taler-exchange-wirewatch.c b/src/exchange/taler-exchange-wirewatch.c @@ -562,6 +562,18 @@ process_reply (const struct TALER_BANK_CreditDetails *details, transaction_completed (); return; } + if (details_length > MAXIMUM_BATCH_SIZE) + { + /* We never ask for more than #MAXIMUM_BATCH_SIZE transactions; a bank + returning more would make us allocate unbounded amounts of stack */ + GNUNET_break_op (0); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Bank returned %u transactions, but we asked for at most %u!\n", + details_length, + (unsigned int) MAXIMUM_BATCH_SIZE); + GNUNET_SCHEDULER_shutdown (); + return; + } hh_returned_data = true; /* check serial IDs for range constraints */ for (unsigned int i = 0; i<details_length; i++)