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/dht/gnunet-service-xdht_routing.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/dht/gnunet-service-xdht_routing.c')
-rw-r--r-- | src/dht/gnunet-service-xdht_routing.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dht/gnunet-service-xdht_routing.c b/src/dht/gnunet-service-xdht_routing.c index 4a85a1ce5..d705a92a5 100644 --- a/src/dht/gnunet-service-xdht_routing.c +++ b/src/dht/gnunet-service-xdht_routing.c | |||
@@ -263,10 +263,10 @@ GDS_ROUTING_test_print (void) | |||
263 | { | 263 | { |
264 | FPRINTF (stderr,_("\nSUPU %s, %s, %d, trail->trail_id = %s"), | 264 | FPRINTF (stderr,_("\nSUPU %s, %s, %d, trail->trail_id = %s"), |
265 | __FILE__, __func__,__LINE__, GNUNET_h2s(&trail->trail_id)); | 265 | __FILE__, __func__,__LINE__, GNUNET_h2s(&trail->trail_id)); |
266 | memcpy (&print_peer, &trail->next_hop, sizeof (struct GNUNET_PeerIdentity)); | 266 | GNUNET_memcpy (&print_peer, &trail->next_hop, sizeof (struct GNUNET_PeerIdentity)); |
267 | FPRINTF (stderr,_("\nSUPU %s, %s, %d, trail->next_hop = %s"), | 267 | FPRINTF (stderr,_("\nSUPU %s, %s, %d, trail->next_hop = %s"), |
268 | __FILE__, __func__,__LINE__, GNUNET_i2s(&print_peer)); | 268 | __FILE__, __func__,__LINE__, GNUNET_i2s(&print_peer)); |
269 | memcpy (&print_peer, &trail->prev_hop, sizeof (struct GNUNET_PeerIdentity)); | 269 | GNUNET_memcpy (&print_peer, &trail->prev_hop, sizeof (struct GNUNET_PeerIdentity)); |
270 | FPRINTF (stderr,_("\nSUPU %s, %s, %d, trail->prev_hop = %s"), | 270 | FPRINTF (stderr,_("\nSUPU %s, %s, %d, trail->prev_hop = %s"), |
271 | __FILE__, __func__,__LINE__, GNUNET_i2s(&print_peer)); | 271 | __FILE__, __func__,__LINE__, GNUNET_i2s(&print_peer)); |
272 | } | 272 | } |