{"action":"created","comment":{"url":"https://api.github.com/repos/monero-project/monero/pulls/comments/201626261","pull_request_review_id":136162455,"id":201626261,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTYyNjI2MQ==","diff_hunk":"@@ -109,9 +115,112 @@ void wipeable_string::push_back(char c)\n   buffer.back() = c;\n }\n \n-void wipeable_string::pop_back()\n+void wipeable_string::operator+=(char c)\n+{\n+  push_back(c);\n+}\n+\n+void wipeable_string::operator+=(const std::string &s)\n+{\n+  CHECK_AND_ASSERT_THROW_MES(size() < std::numeric_limits<size_t>::max() - s.size(), \"Appended data too large\");\n+  grow(size(), size() + s.size());\n+  const char *ptr = s.c_str();\n+  while (*ptr)\n+    push_back(*ptr++);\n+}\n+\n+void wipeable_string::operator+=(const epee::wipeable_string &s)\n+{\n+  CHECK_AND_ASSERT_THROW_MES(size() < std::numeric_limits<size_t>::max() - s.size(), \"Appended data too large\");\n+  grow(size(), size() + s.size());\n+  const char *ptr = s.data();\n+  size_t sz = s.size();\n+  while (sz--)\n+    push_back(*ptr++);\n+}\n+\n+void wipeable_string::operator+=(const char *s)\n+{\n+  size_t slen = strlen(s);\n+  CHECK_AND_ASSERT_THROW_MES(size() < std::numeric_limits<size_t>::max() - slen, \"Appended data too large\");\n+  grow(size(), size() + slen);\n+  while (*s)\n+    push_back(*s++);\n+}\n+\n+void wipeable_string::append(const char *data, size_t len)\n+{\n+  CHECK_AND_ASSERT_THROW_MES(size() < std::numeric_limits<size_t>::max() - len, \"Appended data too large\");\n+  grow(size(), size() + len);\n+  while (len--)\n+    push_back(*data++);\n+}\n+\n+void wipeable_string::trim()\n+{\n+  size_t prefix = 0;\n+  while (prefix < size() && data()[prefix] == ' ')\n+    ++prefix;\n+  if (prefix > 0)\n+    memmove(buffer.data(), buffer.data() + prefix, size() - prefix);\n+\n+  size_t suffix = 0;\n+  while (suffix < size()-prefix && data()[size() - 1 - prefix - suffix] == ' ')\n+    ++suffix;\n+\n+  resize(size() - prefix - suffix);\n+}\n+\n+void wipeable_string::split(std::vector<wipeable_string> &fields)\n+{\n+  fields.clear();\n+  size_t len = size();\n+  const char *ptr = data();\n+  bool space = true;\n+  while (len--)\n+  {\n+    const char c = *ptr++;\n+    if (c != ' ')\n+    {\n+      if (space)\n+        fields.push_back({});\n+      fields.back().push_back(c);\n+    }\n+    space = c == ' ';\n+  }\n+}\n+\n+bool wipeable_string::parse_hexstr(wipeable_string &res)","path":"contrib/epee/src/wipeable_string.cpp","position":93,"original_position":93,"commit_id":"62472f2745a5b03ccd53f6ed887fb33822314637","original_commit_id":"62472f2745a5b03ccd53f6ed887fb33822314637","user":{"login":"moneromooo-monero","id":8851073,"node_id":"MDQ6VXNlcjg4NTEwNzM=","avatar_url":"https://avatars3.githubusercontent.com/u/8851073?v=4","gravatar_id":"","url":"https://api.github.com/users/moneromooo-monero","html_url":"https://github.com/moneromooo-monero","followers_url":"https://api.github.com/users/moneromooo-monero/followers","following_url":"https://api.github.com/users/moneromooo-monero/following{/other_user}","gists_url":"https://api.github.com/users/moneromooo-monero/gists{/gist_id}","starred_url":"https://api.github.com/users/moneromooo-monero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moneromooo-monero/subscriptions","organizations_url":"https://api.github.com/users/moneromooo-monero/orgs","repos_url":"https://api.github.com/users/moneromooo-monero/repos","events_url":"https://api.github.com/users/moneromooo-monero/events{/privacy}","received_events_url":"https://api.github.com/users/moneromooo-monero/received_events","type":"User","site_admin":false},"body":"That makes the calling code more complicated.","created_at":"2018-07-11T09:39:07Z","updated_at":"2018-07-11T09:39:07Z","html_url":"https://github.com/monero-project/monero/pull/4116#discussion_r201626261","pull_request_url":"https://api.github.com/repos/monero-project/monero/pulls/4116","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/monero-project/monero/pulls/comments/201626261"},"html":{"href":"https://github.com/monero-project/monero/pull/4116#discussion_r201626261"},"pull_request":{"href":"https://api.github.com/repos/monero-project/monero/pulls/4116"}},"in_reply_to_id":201437039},"pull_request":{"url":"https://api.github.com/repos/monero-project/monero/pulls/4116","id":200121636,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwMTIxNjM2","html_url":"https://github.com/monero-project/monero/pull/4116","diff_url":"https://github.com/monero-project/monero/pull/4116.diff","patch_url":"https://github.com/monero-project/monero/pull/4116.patch","issue_url":"https://api.github.com/repos/monero-project/monero/issues/4116","number":4116,"state":"open","locked":false,"title":"wallet: wipe seed from memory where appropriate","user":{"login":"moneromooo-monero","id":8851073,"node_id":"MDQ6VXNlcjg4NTEwNzM=","avatar_url":"https://avatars3.githubusercontent.com/u/8851073?v=4","gravatar_id":"","url":"https://api.github.com/users/moneromooo-monero","html_url":"https://github.com/moneromooo-monero","followers_url":"https://api.github.com/users/moneromooo-monero/followers","following_url":"https://api.github.com/users/moneromooo-monero/following{/other_user}","gists_url":"https://api.github.com/users/moneromooo-monero/gists{/gist_id}","starred_url":"https://api.github.com/users/moneromooo-monero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moneromooo-monero/subscriptions","organizations_url":"https://api.github.com/users/moneromooo-monero/orgs","repos_url":"https://api.github.com/users/moneromooo-monero/repos","events_url":"https://api.github.com/users/moneromooo-monero/events{/privacy}","received_events_url":"https://api.github.com/users/moneromooo-monero/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-09T14:40:47Z","updated_at":"2018-07-11T09:39:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c8f6527500cee62f44c5414115627fa391826c09","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/monero-project/monero/pulls/4116/commits","review_comments_url":"https://api.github.com/repos/monero-project/monero/pulls/4116/comments","review_comment_url":"https://api.github.com/repos/monero-project/monero/pulls/comments{/number}","comments_url":"https://api.github.com/repos/monero-project/monero/issues/4116/comments","statuses_url":"https://api.github.com/repos/monero-project/monero/statuses/62472f2745a5b03ccd53f6ed887fb33822314637","head":{"label":"moneromooo-monero:seedw","ref":"seedw","sha":"62472f2745a5b03ccd53f6ed887fb33822314637","user":{"login":"moneromooo-monero","id":8851073,"node_id":"MDQ6VXNlcjg4NTEwNzM=","avatar_url":"https://avatars3.githubusercontent.com/u/8851073?v=4","gravatar_id":"","url":"https://api.github.com/users/moneromooo-monero","html_url":"https://github.com/moneromooo-monero","followers_url":"https://api.github.com/users/moneromooo-monero/followers","following_url":"https://api.github.com/users/moneromooo-monero/following{/other_user}","gists_url":"https://api.github.com/users/moneromooo-monero/gists{/gist_id}","starred_url":"https://api.github.com/users/moneromooo-monero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moneromooo-monero/subscriptions","organizations_url":"https://api.github.com/users/moneromooo-monero/orgs","repos_url":"https://api.github.com/users/moneromooo-monero/repos","events_url":"https://api.github.com/users/moneromooo-monero/events{/privacy}","received_events_url":"https://api.github.com/users/moneromooo-monero/received_events","type":"User","site_admin":false},"repo":{"id":24294045,"node_id":"MDEwOlJlcG9zaXRvcnkyNDI5NDA0NQ==","name":"bitmonero","full_name":"moneromooo-monero/bitmonero","owner":{"login":"moneromooo-monero","id":8851073,"node_id":"MDQ6VXNlcjg4NTEwNzM=","avatar_url":"https://avatars3.githubusercontent.com/u/8851073?v=4","gravatar_id":"","url":"https://api.github.com/users/moneromooo-monero","html_url":"https://github.com/moneromooo-monero","followers_url":"https://api.github.com/users/moneromooo-monero/followers","following_url":"https://api.github.com/users/moneromooo-monero/following{/other_user}","gists_url":"https://api.github.com/users/moneromooo-monero/gists{/gist_id}","starred_url":"https://api.github.com/users/moneromooo-monero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moneromooo-monero/subscriptions","organizations_url":"https://api.github.com/users/moneromooo-monero/orgs","repos_url":"https://api.github.com/users/moneromooo-monero/repos","events_url":"https://api.github.com/users/moneromooo-monero/events{/privacy}","received_events_url":"https://api.github.com/users/moneromooo-monero/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/moneromooo-monero/bitmonero","description":"Monero: the secure, private, untraceable cryptocurrency","fork":true,"url":"https://api.github.com/repos/moneromooo-monero/bitmonero","forks_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/forks","keys_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/teams","hooks_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/hooks","issue_events_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/issues/events{/number}","events_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/events","assignees_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/assignees{/user}","branches_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/branches{/branch}","tags_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/tags","blobs_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/git/refs{/sha}","trees_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/statuses/{sha}","languages_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/languages","stargazers_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/stargazers","contributors_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/contributors","subscribers_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/subscribers","subscription_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/subscription","commits_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/commits{/sha}","git_commits_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/git/commits{/sha}","comments_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/comments{/number}","issue_comment_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/issues/comments{/number}","contents_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/contents/{+path}","compare_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/merges","archive_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/downloads","issues_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/issues{/number}","pulls_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/pulls{/number}","milestones_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/milestones{/number}","notifications_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/labels{/name}","releases_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/releases{/id}","deployments_url":"https://api.github.com/repos/moneromooo-monero/bitmonero/deployments","created_at":"2014-09-21T15:04:04Z","updated_at":"2018-04-12T19:46:34Z","pushed_at":"2018-07-10T22:40:37Z","git_url":"git://github.com/moneromooo-monero/bitmonero.git","ssh_url":"git@github.com:moneromooo-monero/bitmonero.git","clone_url":"https://github.com/moneromooo-monero/bitmonero.git","svn_url":"https://github.com/moneromooo-monero/bitmonero","homepage":"https://getmonero.org","size":146328,"stargazers_count":12,"watchers_count":12,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":5,"open_issues":0,"watchers":12,"default_branch":"master"}},"base":{"label":"monero-project:master","ref":"master","sha":"7d2d8055ac1eb524f3917a713b071772ddc89761","user":{"login":"monero-project","id":7450663,"node_id":"MDQ6VXNlcjc0NTA2NjM=","avatar_url":"https://avatars2.githubusercontent.com/u/7450663?v=4","gravatar_id":"","url":"https://api.github.com/users/monero-project","html_url":"https://github.com/monero-project","followers_url":"https://api.github.com/users/monero-project/followers","following_url":"https://api.github.com/users/monero-project/following{/other_user}","gists_url":"https://api.github.com/users/monero-project/gists{/gist_id}","starred_url":"https://api.github.com/users/monero-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monero-project/subscriptions","organizations_url":"https://api.github.com/users/monero-project/orgs","repos_url":"https://api.github.com/users/monero-project/repos","events_url":"https://api.github.com/users/monero-project/events{/privacy}","received_events_url":"https://api.github.com/users/monero-project/received_events","type":"User","site_admin":false},"repo":{"id":19316619,"node_id":"MDEwOlJlcG9zaXRvcnkxOTMxNjYxOQ==","name":"monero","full_name":"monero-project/monero","owner":{"login":"monero-project","id":7450663,"node_id":"MDQ6VXNlcjc0NTA2NjM=","avatar_url":"https://avatars2.githubusercontent.com/u/7450663?v=4","gravatar_id":"","url":"https://api.github.com/users/monero-project","html_url":"https://github.com/monero-project","followers_url":"https://api.github.com/users/monero-project/followers","following_url":"https://api.github.com/users/monero-project/following{/other_user}","gists_url":"https://api.github.com/users/monero-project/gists{/gist_id}","starred_url":"https://api.github.com/users/monero-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monero-project/subscriptions","organizations_url":"https://api.github.com/users/monero-project/orgs","repos_url":"https://api.github.com/users/monero-project/repos","events_url":"https://api.github.com/users/monero-project/events{/privacy}","received_events_url":"https://api.github.com/users/monero-project/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/monero-project/monero","description":"Monero: the secure, private, untraceable cryptocurrency","fork":false,"url":"https://api.github.com/repos/monero-project/monero","forks_url":"https://api.github.com/repos/monero-project/monero/forks","keys_url":"https://api.github.com/repos/monero-project/monero/keys{/key_id}","collaborators_url":"https://api.github.com/repos/monero-project/monero/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/monero-project/monero/teams","hooks_url":"https://api.github.com/repos/monero-project/monero/hooks","issue_events_url":"https://api.github.com/repos/monero-project/monero/issues/events{/number}","events_url":"https://api.github.com/repos/monero-project/monero/events","assignees_url":"https://api.github.com/repos/monero-project/monero/assignees{/user}","branches_url":"https://api.github.com/repos/monero-project/monero/branches{/branch}","tags_url":"https://api.github.com/repos/monero-project/monero/tags","blobs_url":"https://api.github.com/repos/monero-project/monero/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/monero-project/monero/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/monero-project/monero/git/refs{/sha}","trees_url":"https://api.github.com/repos/monero-project/monero/git/trees{/sha}","statuses_url":"https://api.github.com/repos/monero-project/monero/statuses/{sha}","languages_url":"https://api.github.com/repos/monero-project/monero/languages","stargazers_url":"https://api.github.com/repos/monero-project/monero/stargazers","contributors_url":"https://api.github.com/repos/monero-project/monero/contributors","subscribers_url":"https://api.github.com/repos/monero-project/monero/subscribers","subscription_url":"https://api.github.com/repos/monero-project/monero/subscription","commits_url":"https://api.github.com/repos/monero-project/monero/commits{/sha}","git_commits_url":"https://api.github.com/repos/monero-project/monero/git/commits{/sha}","comments_url":"https://api.github.com/repos/monero-project/monero/comments{/number}","issue_comment_url":"https://api.github.com/repos/monero-project/monero/issues/comments{/number}","contents_url":"https://api.github.com/repos/monero-project/monero/contents/{+path}","compare_url":"https://api.github.com/repos/monero-project/monero/compare/{base}...{head}","merges_url":"https://api.github.com/repos/monero-project/monero/merges","archive_url":"https://api.github.com/repos/monero-project/monero/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/monero-project/monero/downloads","issues_url":"https://api.github.com/repos/monero-project/monero/issues{/number}","pulls_url":"https://api.github.com/repos/monero-project/monero/pulls{/number}","milestones_url":"https://api.github.com/repos/monero-project/monero/milestones{/number}","notifications_url":"https://api.github.com/repos/monero-project/monero/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/monero-project/monero/labels{/name}","releases_url":"https://api.github.com/repos/monero-project/monero/releases{/id}","deployments_url":"https://api.github.com/repos/monero-project/monero/deployments","created_at":"2014-04-30T14:38:28Z","updated_at":"2018-07-11T05:25:46Z","pushed_at":"2018-07-10T19:09:19Z","git_url":"git://github.com/monero-project/monero.git","ssh_url":"git@github.com:monero-project/monero.git","clone_url":"https://github.com/monero-project/monero.git","svn_url":"https://github.com/monero-project/monero","homepage":"https://getmonero.org","size":141112,"stargazers_count":3107,"watchers_count":3107,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1570,"mirror_url":null,"archived":false,"open_issues_count":322,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1570,"open_issues":322,"watchers":3107,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/monero-project/monero/pulls/4116"},"html":{"href":"https://github.com/monero-project/monero/pull/4116"},"issue":{"href":"https://api.github.com/repos/monero-project/monero/issues/4116"},"comments":{"href":"https://api.github.com/repos/monero-project/monero/issues/4116/comments"},"review_comments":{"href":"https://api.github.com/repos/monero-project/monero/pulls/4116/comments"},"review_comment":{"href":"https://api.github.com/repos/monero-project/monero/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/monero-project/monero/pulls/4116/commits"},"statuses":{"href":"https://api.github.com/repos/monero-project/monero/statuses/62472f2745a5b03ccd53f6ed887fb33822314637"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"moneromooo-monero"}}