aboutsummaryrefslogtreecommitdiff
path: root/src/identity/plugin_rest_identity.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/identity/plugin_rest_identity.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/identity/plugin_rest_identity.c')
-rw-r--r--src/identity/plugin_rest_identity.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/identity/plugin_rest_identity.c b/src/identity/plugin_rest_identity.c
index aa8a5ca60..e64b2685a 100644
--- a/src/identity/plugin_rest_identity.c
+++ b/src/identity/plugin_rest_identity.c
@@ -517,7 +517,7 @@ ego_create_cont (struct GNUNET_REST_RequestHandle *con,
517 return; 517 return;
518 } 518 }
519 term_data[handle->data_size] = '\0'; 519 term_data[handle->data_size] = '\0';
520 memcpy (term_data, handle->data, handle->data_size); 520 GNUNET_memcpy (term_data, handle->data, handle->data_size);
521 data_js = json_loads (term_data, 521 data_js = json_loads (term_data,
522 JSON_DECODE_ANY, 522 JSON_DECODE_ANY,
523 &err); 523 &err);
@@ -646,7 +646,7 @@ ego_edit_cont (struct GNUNET_REST_RequestHandle *con,
646 } 646 }
647 647
648 term_data[handle->data_size] = '\0'; 648 term_data[handle->data_size] = '\0';
649 memcpy (term_data, handle->data, handle->data_size); 649 GNUNET_memcpy (term_data, handle->data, handle->data_size);
650 data_js = json_loads (term_data, 650 data_js = json_loads (term_data,
651 JSON_DECODE_ANY, 651 JSON_DECODE_ANY,
652 &err); 652 &err);