View Issue Details

IDProjectCategoryView StatusLast Update
0008658Talermechant backendpublic2024-04-15 21:33
Reporterfefe Assigned ToChristian Grothoff  
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.

Activities

fefe

2024-03-22 13:59

developer   ~0021973

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

this should be a size_t as well

Christian Grothoff

2024-03-22 14:14

manager   ~0021974

Last edited: 2024-03-22 14: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 Modified Username Field Change
2024-03-22 13:58 fefe New Issue
2024-03-22 13:58 fefe Status new => assigned
2024-03-22 13:58 fefe Assigned To => Christian Grothoff
2024-03-22 13:59 fefe Note Added: 0021973
2024-03-22 14:14 Christian Grothoff Note Added: 0021974
2024-03-22 14:17 Christian Grothoff Note Edited: 0021974
2024-03-22 14:18 Christian Grothoff Status assigned => resolved
2024-03-22 14:18 Christian Grothoff Resolution open => fixed
2024-03-22 14:18 Christian Grothoff Fixed in Version => 0.10
2024-03-22 14:18 Christian Grothoff Target Version git (master) => 0.10
2024-04-15 21:33 Christian Grothoff Status resolved => closed