aboutsummaryrefslogtreecommitdiff
path: root/src/fs/fs_publish.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/fs/fs_publish.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/fs/fs_publish.c')
-rw-r--r--src/fs/fs_publish.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c
index 7cf8b4815..01305d678 100644
--- a/src/fs/fs_publish.c
+++ b/src/fs/fs_publish.c
@@ -380,7 +380,7 @@ block_reader (void *cls,
380 { 380 {
381 pt_size = GNUNET_MIN (max, p->data.dir.dir_size - offset); 381 pt_size = GNUNET_MIN (max, p->data.dir.dir_size - offset);
382 dd = p->data.dir.dir_data; 382 dd = p->data.dir.dir_data;
383 memcpy (buf, &dd[offset], pt_size); 383 GNUNET_memcpy (buf, &dd[offset], pt_size);
384 } 384 }
385 else 385 else
386 { 386 {
@@ -903,7 +903,7 @@ hash_for_index_cb (void *cls,
903 p->filename); 903 p->filename);
904 } 904 }
905 ism->file_id = *res; 905 ism->file_id = *res;
906 memcpy (&ism[1], 906 GNUNET_memcpy (&ism[1],
907 fn, 907 fn,
908 slen); 908 slen);
909 GNUNET_free (fn); 909 GNUNET_free (fn);