View Issue Details

IDProjectCategoryView StatusLast Update
0006190GNUnetutil librarypublic2021-09-02 16:14
Reporterfefe Assigned ToChristian Grothoff Due Date
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Version0.12.1 
Target Version0.13.0Fixed in Version0.13.0 
Summary0006190: GNUNET_array_grow needs a version that copies
DescriptionExample code from exchange/src/lib/exchange_api_handle.c:

1015 GNUNET_array_grow (aix->denom_keys,
1016 aix->num_denom_keys,
1017 aix->num_denom_keys + ai.num_denom_keys);
1018 memcpy (&aix->denom_keys[aix->num_denom_keys - ai.num_denom_keys],
1019 ai.denom_keys,
1020 ai.num_denom_keys * sizeof (struct
1021 TALER_EXCHANGE_AuditorDenominationInfo));

The abstraction did not abstract the actually dangerous part away.
All this dangerous pointer arithmetic should be abstracted away.
Recommendation: Add GNUNET_array_append
TagsNo tags attached.

Activities

Christian Grothoff

2020-04-21 11:34

manager   ~0015719

GNUNET_array_append exists, to append a single element.

Christian Grothoff

2020-04-21 11:54

manager   ~0015721

13ceb583b892ecbe1094e473c058a6ff18ad0efb defines GNUNET_array_concatenate(), including checks that the arrays are (usually) of the same type and guards against overflows (addition + multiplication).
8148c1e8..a5460cc8 uses GNUNET_array_concatenate()

schanzen

2020-07-09 07:17

administrator   ~0016426

0.13.0 released

Christian Grothoff

2021-09-02 16:14

manager   ~0018262

Fix committed to master branch.

Issue History

Date ModifiedUsernameFieldChange
2020-04-21 10:34fefeNew Issue
2020-04-21 11:34Christian GrothoffNote Added: 0015719
2020-04-21 11:54Christian GrothoffNote Added: 0015721
2020-04-21 11:54Christian GrothoffAssigned To => Christian Grothoff
2020-04-21 11:54Christian GrothoffStatusnew => resolved
2020-04-21 11:54Christian GrothoffResolutionopen => fixed
2020-04-21 11:54Christian GrothoffFixed in Version => 0.12.2
2020-04-21 11:54Christian GrothoffTarget Version => 0.12.2
2020-04-23 08:44schanzenFixed in Version0.12.2 => 0.13.0
2020-04-23 08:47schanzenTarget Version0.12.2 => 0.13.0
2020-05-31 22:49AdminknoxIssue cloned: 0006311
2020-05-31 22:52AdminknoxIssue cloned: 0006343
2020-07-09 07:17schanzenNote Added: 0016426
2020-07-09 07:17schanzenStatusresolved => closed
2021-09-02 16:13Christian Grothoff
2021-09-02 16:14Christian GrothoffNote Added: 0018262