-fix batch deposit uninit issue

This commit is contained in:
Christian Grothoff 2022-07-02 22:51:45 +02:00
parent 74cf7654e5
commit ff2eb4f3dd
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
3 changed files with 3 additions and 7 deletions

View File

@ -545,6 +545,9 @@ TEH_handler_batch_deposit (struct TEH_RequestContext *rc,
}; };
enum GNUNET_GenericReturnValue res; enum GNUNET_GenericReturnValue res;
memset (&dc,
0,
sizeof (dc));
res = TALER_MHD_parse_json_data (connection, res = TALER_MHD_parse_json_data (connection,
root, root,
spec); spec);

View File

@ -421,7 +421,6 @@ TALER_EXCHANGE_deposit (
"/coins/%s/deposit", "/coins/%s/deposit",
pub_str); pub_str);
} }
key_state = TALER_EXCHANGE_get_keys (exchange); key_state = TALER_EXCHANGE_get_keys (exchange);
dki = TALER_EXCHANGE_get_denomination_key_by_hash (key_state, dki = TALER_EXCHANGE_get_denomination_key_by_hash (key_state,
&cdd->h_denom_pub); &cdd->h_denom_pub);
@ -431,7 +430,6 @@ TALER_EXCHANGE_deposit (
GNUNET_break_op (0); GNUNET_break_op (0);
return NULL; return NULL;
} }
if (0 > if (0 >
TALER_amount_subtract (&amount_without_fee, TALER_amount_subtract (&amount_without_fee,
&cdd->amount, &cdd->amount,

View File

@ -138,10 +138,8 @@ TALER_wallet_deposit_sign (
if (NULL != h_age_commitment) if (NULL != h_age_commitment)
dr.h_age_commitment = *h_age_commitment; dr.h_age_commitment = *h_age_commitment;
if (NULL != h_extensions) if (NULL != h_extensions)
dr.h_extensions = *h_extensions; dr.h_extensions = *h_extensions;
TALER_amount_hton (&dr.amount_with_fee, TALER_amount_hton (&dr.amount_with_fee,
amount); amount);
TALER_amount_hton (&dr.deposit_fee, TALER_amount_hton (&dr.deposit_fee,
@ -182,15 +180,12 @@ TALER_wallet_deposit_verify (
if (NULL != h_age_commitment) if (NULL != h_age_commitment)
dr.h_age_commitment = *h_age_commitment; dr.h_age_commitment = *h_age_commitment;
if (NULL != h_extensions) if (NULL != h_extensions)
dr.h_extensions = *h_extensions; dr.h_extensions = *h_extensions;
TALER_amount_hton (&dr.amount_with_fee, TALER_amount_hton (&dr.amount_with_fee,
amount); amount);
TALER_amount_hton (&dr.deposit_fee, TALER_amount_hton (&dr.deposit_fee,
deposit_fee); deposit_fee);
if (GNUNET_OK != if (GNUNET_OK !=
GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_WALLET_COIN_DEPOSIT, GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_WALLET_COIN_DEPOSIT,
&dr, &dr,