View Issue Details

IDProjectCategoryView StatusLast Update
0006190GNUnetutil librarypublic2020-07-09 09:17
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

manager   ~0016426

0.13.0 released

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