fix 0-length VLAs

This commit is contained in:
Christian Grothoff 2023-05-10 00:57:04 +02:00
parent aedd13a778
commit 3ebd0a70b2
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 13 additions and 12 deletions

View File

@ -780,6 +780,7 @@ TALER_KYCLOGIC_kyc_init (const struct GNUNET_CONFIGURATION_Handle *cfg)
TALER_KYCLOGIC_kyc_done ();
return GNUNET_SYSERR;
}
if (0 != num_kyc_triggers)
qsort (kyc_triggers,
num_kyc_triggers,
sizeof (struct TALER_KYCLOGIC_KycTrigger *),

View File

@ -1366,7 +1366,7 @@ keys_completed_cb (void *cls,
kd.num_denom_keys);
/* First make a shallow copy, we then need another pass for the RSA key... */
memcpy (kd.denom_keys,
GNUNET_memcpy (kd.denom_keys,
kd_old.denom_keys,
kd_old.num_denom_keys * sizeof (struct
TALER_EXCHANGE_DenomPublicKey));
@ -1391,7 +1391,7 @@ keys_completed_cb (void *cls,
GNUNET_array_grow (anew->denom_keys,
anew->num_denom_keys,
aold->num_denom_keys);
memcpy (anew->denom_keys,
GNUNET_memcpy (anew->denom_keys,
aold->denom_keys,
aold->num_denom_keys
* sizeof (struct TALER_EXCHANGE_AuditorDenominationInfo));