View Issue Details

IDProjectCategoryView StatusLast Update
0008045GNUnetutil librarypublic2024-03-07 20:26
Reporterfefe Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Fixed in Version0.21.0 
Summary0008045: GNUNET_STRINGS_parse_uri: use strndup instead of malloc+memcpy
DescriptionThis is in gnunet/src/lib/util/strings.c:

 946 if (scheme_part)
 947 {
 948 *scheme_part = GNUNET_malloc (post_scheme_part - path + 1);
 949 GNUNET_memcpy (*scheme_part, path, post_scheme_part - path);
 950 (*scheme_part)[post_scheme_part - path] = '\0';
 951 }

This looks like a job for GNUNET_strndup to me.
TagsNo tags attached.

Activities

Christian Grothoff

2024-01-09 19:04

manager   ~0020842

Not quite, strndup != GNUNET_malloc(), but we do have GNUNET_strndup() now, and that should be used.

Christian Grothoff

2024-01-09 19:04

manager   ~0020843

Fix committed to master branch.

schanzen

2024-03-07 20:26

administrator   ~0021801

0.21 released

Related Changesets

gnunet: master 09a098cf

2024-01-09 20:04

Christian Grothoff


Details Diff
fix 0008045 Affected Issues
0008045
mod - src/lib/util/strings.c Diff File

Issue History

Date Modified Username Field Change
2024-01-09 16:25 fefe New Issue
2024-01-09 19:04 Christian Grothoff Note Added: 0020842
2024-01-09 19:04 Christian Grothoff Changeset attached => gnunet master 09a098cf
2024-01-09 19:04 Christian Grothoff Note Added: 0020843
2024-01-09 19:04 Christian Grothoff Assigned To => Christian Grothoff
2024-01-09 19:04 Christian Grothoff Status new => resolved
2024-01-09 19:04 Christian Grothoff Resolution open => fixed
2024-01-09 20:10 Christian Grothoff Project Taler => GNUnet
2024-01-09 20:10 Christian Grothoff Category other => util library
2024-03-07 20:26 schanzen Fixed in Version => 0.21.0
2024-03-07 20:26 schanzen Note Added: 0021801
2024-03-07 20:26 schanzen Status resolved => closed