commit b9e1e2fab466d8e6ca0d9646c3af1dafde0a9098
parent f36f501da6dce0223da07f59f4989c41bdda4ff2
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Sun, 18 Jan 2026 08:41:36 +0100
Merge branch 'master' of git+ssh://git.taler.net/exchange
Diffstat:
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/json/json_helper.c b/src/json/json_helper.c
@@ -171,8 +171,6 @@ parse_amount_any_array (void *cls,
struct AmountArrayCtx *ctx = cls;
struct TALER_Amount **out = spec->ptr;
- GNUNET_assert (NULL != ctx);
- GNUNET_assert (NULL != out);
*out = NULL;
if (NULL != ctx->len)
*ctx->len = 0;
@@ -2164,8 +2162,8 @@ TALER_JSON_spec_array_of_data (
struct closure_array_of_data *cls;
GNUNET_assert (0< entry_size);
- GNUNET_assert (NULL != entries);
*entries = NULL;
+ *num_entries = 0;
cls = GNUNET_new (struct closure_array_of_data);
cls->num_entries = num_entries;
cls->entry_size = entry_size;
@@ -2189,6 +2187,8 @@ TALER_JSON_spec_array_of_denom_pub_h (
size_t *num_entries,
struct TALER_DenominationHashP **entries)
{
+ *num_entries = 0;
+ *entries = NULL;
return TALER_JSON_spec_array_of_data (
field,
sizeof (struct TALER_DenominationHashP),
@@ -2256,6 +2256,8 @@ TALER_JSON_spec_array_of_blinded_denom_sigs (
size_t num_entries,
struct TALER_BlindedDenominationSignature *entries)
{
+ for (size_t i = 0; i<num_entries; i++)
+ entries[i].blinded_sig = NULL;
struct GNUNET_JSON_Specification ret = {
.parser = &parse_array_of_blinded_denom_sigs,
.ptr = entries,
diff --git a/src/util/amount.c b/src/util/amount.c
@@ -75,7 +75,6 @@ enum GNUNET_GenericReturnValue
TALER_string_to_amount (const char *str,
struct TALER_Amount *amount)
{
- int n;
uint32_t b;
const char *colon;
const char *value;
@@ -131,6 +130,8 @@ TALER_string_to_amount (const char *str,
/* parse value */
while ('.' != *value)
{
+ int n;
+
if ('\0' == *value)
{
/* we are done */
@@ -177,6 +178,8 @@ TALER_string_to_amount (const char *str,
b = TALER_AMOUNT_FRAC_BASE / 10;
while ('\0' != *value)
{
+ int n;
+
if (0 == b)
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,