gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated: fix #8103


From: gnunet
Subject: [taler-exchange] branch master updated: fix #8103
Date: Thu, 18 Jan 2024 22:37:58 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 9e709172 fix #8103
9e709172 is described below

commit 9e70917239af44b2c6bcfe66bbf3418f9069c8e2
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Thu Jan 18 22:37:54 2024 +0100

    fix #8103
---
 src/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
index 4d1dacbb..a0902057 100644
--- a/src/lib/exchange_api_handle.c
+++ b/src/lib/exchange_api_handle.c
@@ -280,17 +280,22 @@ parse_fees (const struct TALER_MasterPublicKeyP 
*master_pub,
             unsigned int *fees_len)
 {
   struct TALER_EXCHANGE_WireFeesByMethod *fbm;
-  unsigned int fbml = json_object_size (fees);
+  size_t fbml = json_object_size (fees);
   unsigned int i = 0;
   const char *key;
   const json_t *fee_array;
 
+  if (UINT_MAX < fbml)
+  {
+    GNUNET_break (0);
+    return NULL;
+  }
   fbm = GNUNET_new_array (fbml,
                           struct TALER_EXCHANGE_WireFeesByMethod);
-  *fees_len = fbml;
+  *fees_len = (unsigned int) fbml;
   json_object_foreach ((json_t *) fees, key, fee_array) {
     struct TALER_EXCHANGE_WireFeesByMethod *fe = &fbm[i++];
-    unsigned int idx;
+    size_t idx;
     json_t *fee;
 
     fe->method = GNUNET_strdup (key);

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]