aboutsummaryrefslogtreecommitdiff
path: root/src/regex/gnunet-service-regex.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-07-08 17:20:23 +0000
committerChristian Grothoff <christian@grothoff.org>2016-07-08 17:20:23 +0000
commitd8c53b12a818ff7cf82d06a1a69c395bdef85ee6 (patch)
tree0ebb0db416c157fcfde51a941185819dd12d51fd /src/regex/gnunet-service-regex.c
parent5184c17d32a39c928c2a0fec3ee1ad098bbaa562 (diff)
downloadgnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.tar.gz
gnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.zip
-avoid calling memcpy() with NULL argument, even if len is 0
Diffstat (limited to 'src/regex/gnunet-service-regex.c')
-rw-r--r--src/regex/gnunet-service-regex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/regex/gnunet-service-regex.c b/src/regex/gnunet-service-regex.c
index 530e4f358..294670be6 100644
--- a/src/regex/gnunet-service-regex.c
+++ b/src/regex/gnunet-service-regex.c
@@ -288,10 +288,10 @@ handle_search_result (void *cls,
288 result->put_path_length = htons ((uint16_t) put_path_length); 288 result->put_path_length = htons ((uint16_t) put_path_length);
289 result->id = *id; 289 result->id = *id;
290 gp = &result->id; 290 gp = &result->id;
291 memcpy (&gp[1], 291 GNUNET_memcpy (&gp[1],
292 get_path, 292 get_path,
293 get_path_length * sizeof (struct GNUNET_PeerIdentity)); 293 get_path_length * sizeof (struct GNUNET_PeerIdentity));
294 memcpy (&gp[1 + get_path_length], 294 GNUNET_memcpy (&gp[1 + get_path_length],
295 put_path, 295 put_path,
296 put_path_length * sizeof (struct GNUNET_PeerIdentity)); 296 put_path_length * sizeof (struct GNUNET_PeerIdentity));
297 GNUNET_SERVER_notification_context_unicast (nc, 297 GNUNET_SERVER_notification_context_unicast (nc,