diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-07-08 17:20:23 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-07-08 17:20:23 +0000 |
commit | d8c53b12a818ff7cf82d06a1a69c395bdef85ee6 (patch) | |
tree | 0ebb0db416c157fcfde51a941185819dd12d51fd /src/cadet/cadet_tunnel_tree.c | |
parent | 5184c17d32a39c928c2a0fec3ee1ad098bbaa562 (diff) | |
download | gnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.tar.gz gnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.zip |
-avoid calling memcpy() with NULL argument, even if len is 0
Diffstat (limited to 'src/cadet/cadet_tunnel_tree.c')
-rw-r--r-- | src/cadet/cadet_tunnel_tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cadet/cadet_tunnel_tree.c b/src/cadet/cadet_tunnel_tree.c index 8ea012a36..81a38e4e8 100644 --- a/src/cadet/cadet_tunnel_tree.c +++ b/src/cadet/cadet_tunnel_tree.c | |||
@@ -161,7 +161,7 @@ path_duplicate (struct CadetPeerPath *path) | |||
161 | unsigned int i; | 161 | unsigned int i; |
162 | 162 | ||
163 | aux = path_new (path->length); | 163 | aux = path_new (path->length); |
164 | memcpy (aux->peers, path->peers, path->length * sizeof (GNUNET_PEER_Id)); | 164 | GNUNET_memcpy (aux->peers, path->peers, path->length * sizeof (GNUNET_PEER_Id)); |
165 | for (i = 0; i < path->length; i++) | 165 | for (i = 0; i < path->length; i++) |
166 | GNUNET_PEER_change_rc (path->peers[i], 1); | 166 | GNUNET_PEER_change_rc (path->peers[i], 1); |
167 | return aux; | 167 | return aux; |