View Issue Details

IDProjectCategoryView StatusLast Update
0006190GNUnetutil librarypublic2021-09-02 18:14
Reporterfefe Assigned ToChristian Grothoff  
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 13:34

manager   ~0015719

GNUNET_array_append exists, to append a single element.

Christian Grothoff

2020-04-21 13: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 09:17

administrator   ~0016426

0.13.0 released

Christian Grothoff

2021-09-02 18:14

manager   ~0018262

Fix committed to master branch.

Related Changesets

exchange: master a5460cc8

2020-04-21 15:48

Christian Grothoff


Details Diff
fix 0006190 Affected Issues
0006190
mod - src/lib/exchange_api_handle.c Diff File

Issue History

Date Modified Username Field Change
2020-04-21 12:34 fefe New Issue
2020-04-21 13:34 Christian Grothoff Note Added: 0015719
2020-04-21 13:54 Christian Grothoff Note Added: 0015721
2020-04-21 13:54 Christian Grothoff Assigned To => Christian Grothoff
2020-04-21 13:54 Christian Grothoff Status new => resolved
2020-04-21 13:54 Christian Grothoff Resolution open => fixed
2020-04-21 13:54 Christian Grothoff Fixed in Version => 0.12.2
2020-04-21 13:54 Christian Grothoff Target Version => 0.12.2
2020-04-23 10:44 schanzen Fixed in Version 0.12.2 => 0.13.0
2020-04-23 10:47 schanzen Target Version 0.12.2 => 0.13.0
2020-06-01 00:49 Adminknox Issue cloned: 0006311
2020-06-01 00:52 Adminknox Issue cloned: 0006343
2020-07-09 09:17 schanzen Note Added: 0016426
2020-07-09 09:17 schanzen Status resolved => closed
2021-09-02 18:13 Christian Grothoff Changeset attached => Taler-exchange master a5460cc8
2021-09-02 18:14 Christian Grothoff Note Added: 0018262