exchange

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

commit dbf84c5121543754d10d04be6182da0603754e32
parent d7962e0172fcf32dde62125eac83c4c3816666da
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu, 18 Jan 2024 22:23:37 +0100

fix #8105

Diffstat:
Msrc/lib/exchange_api_handle.c | 11++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c @@ -544,8 +544,8 @@ parse_json_auditor (struct TALER_EXCHANGE_AuditorInformation *auditor, { const json_t *keys; json_t *key; - unsigned int off; - unsigned int pos; + size_t off; + size_t pos; const char *auditor_url; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_fixed_auto ("auditor_pub", @@ -637,7 +637,12 @@ parse_json_auditor (struct TALER_EXCHANGE_AuditorInformation *auditor, auditor->denom_keys[pos].auditor_sig = auditor_sig; pos++; } - auditor->num_denom_keys = pos; + if (pos > UINT_MAX) + { + GNUNET_break (0); + return GNUNET_SYSERR; + } + auditor->num_denom_keys = (unsigned int) pos; return GNUNET_OK; }