View Issue Details

IDProjectCategoryView StatusLast Update
0008658Talermerchant backendpublic2024-04-15 19:33
Reporterfefe Assigned ToChristian Grothoff Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.10Fixed in Version0.10 
Summary0008658: handle_config_finished: num_eci should be size_t
DescriptionIn merchant/src/lib/merchant_api_get_config.c:

 86 static void
 87 handle_config_finished (void *cls,
 88 long response_code,
 89 const void *response)

110 unsigned int num_eci = 0;

158 num_eci = json_object_size (exchanges);

json_object_size returns a size_t, so num_eci should be a size_t.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

fefe

2024-03-22 12:59

reporter   ~0021973

161 for (unsigned int i = 0; i<num_eci; i++)

this should be a size_t as well

Christian Grothoff

2024-03-22 13:14

manager   ~0021974

Last edited: 2024-03-22 13:17

I prefer to keep unsigned int, as that's exposed in the external API.
Added a cast, a check that the size_t value is the same, plus an upper bound of 1024, both for this array and the jcs currency spec object.
Fixed pushed in 6d41df4..2c9b6f5.
Oh, and the break logic was very broken (some missing, sometimes not calling the CB). Fixed that now, too.

Issue History

Date ModifiedUsernameFieldChange
2024-03-22 12:58fefeNew Issue
2024-03-22 12:58fefeStatusnew => assigned
2024-03-22 12:58fefeAssigned To => Christian Grothoff
2024-03-22 12:59fefeNote Added: 0021973
2024-03-22 13:14Christian GrothoffNote Added: 0021974
2024-03-22 13:17Christian GrothoffNote Edited: 0021974
2024-03-22 13:18Christian GrothoffStatusassigned => informing
2024-03-22 13:18Christian GrothoffResolutionopen => fixed
2024-03-22 13:18Christian GrothoffFixed in Version => 0.10
2024-03-22 13:18Christian GrothoffTarget Versiongit (master) => 0.10
2024-04-15 19:33Christian GrothoffStatusinforming => closed
2025-03-22 13:09Christian GrothoffCategorymechant backend => merchant backend