{"action":"created","comment":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/comments/82341842","pull_request_review_id":3256631,"id":82341842,"diff_hunk":"@@ -122,6 +122,7 @@ static void ipv6_from_address(uint8_t *bytes, const char *addr)\n     // Move suffix to end\n     memmove(&shorts[NSAPI_IPv6_BYTES/2-suffix], &shorts[0],\n             suffix*sizeof(uint16_t));\n+    memset(&shorts[0], 0, suffix*sizeof(uint16_t));","path":"features/netsocket/SocketAddress.cpp","position":4,"original_position":4,"commit_id":"16c4da03e62fc2367b33be8bb9358c28804fffb3","original_commit_id":"16c4da03e62fc2367b33be8bb9358c28804fffb3","user":{"login":"EduardPon","id":16540812,"avatar_url":"https://avatars.githubusercontent.com/u/16540812?v=3","gravatar_id":"","url":"https://api.github.com/users/EduardPon","html_url":"https://github.com/EduardPon","followers_url":"https://api.github.com/users/EduardPon/followers","following_url":"https://api.github.com/users/EduardPon/following{/other_user}","gists_url":"https://api.github.com/users/EduardPon/gists{/gist_id}","starred_url":"https://api.github.com/users/EduardPon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EduardPon/subscriptions","organizations_url":"https://api.github.com/users/EduardPon/orgs","repos_url":"https://api.github.com/users/EduardPon/repos","events_url":"https://api.github.com/users/EduardPon/events{/privacy}","received_events_url":"https://api.github.com/users/EduardPon/received_events","type":"User","site_admin":false},"body":"This memset solution not more expensive (slower your writing 2x bytes instead of 1x words (uint16_t) ). The variable `shorts `is already a uint16_t.","created_at":"2016-10-07T07:39:48Z","updated_at":"2016-10-07T07:39:48Z","html_url":"https://github.com/ARMmbed/mbed-os/pull/2953#discussion_r82341842","pull_request_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/2953","_links":{"self":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/comments/82341842"},"html":{"href":"https://github.com/ARMmbed/mbed-os/pull/2953#discussion_r82341842"},"pull_request":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/2953"}}},"pull_request":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/2953","id":88290986,"html_url":"https://github.com/ARMmbed/mbed-os/pull/2953","diff_url":"https://github.com/ARMmbed/mbed-os/pull/2953.diff","patch_url":"https://github.com/ARMmbed/mbed-os/pull/2953.patch","issue_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/2953","number":2953,"state":"open","locked":false,"title":"nsapi - Fix leftover bytes from suffix during ipv6 parsing","user":{"login":"geky","id":1075160,"avatar_url":"https://avatars.githubusercontent.com/u/1075160?v=3","gravatar_id":"","url":"https://api.github.com/users/geky","html_url":"https://github.com/geky","followers_url":"https://api.github.com/users/geky/followers","following_url":"https://api.github.com/users/geky/following{/other_user}","gists_url":"https://api.github.com/users/geky/gists{/gist_id}","starred_url":"https://api.github.com/users/geky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geky/subscriptions","organizations_url":"https://api.github.com/users/geky/orgs","repos_url":"https://api.github.com/users/geky/repos","events_url":"https://api.github.com/users/geky/events{/privacy}","received_events_url":"https://api.github.com/users/geky/received_events","type":"User","site_admin":false},"body":"Thanks to @EduardPon for hunting this down:\r\n\r\n> In the function ipv6_from_address(), address values of IPv6 address after a :: is found are moved to the end of the short[] array. But the source memory of the moved part should also be cleared with zeros before the address values in front of the :: are copied. In the current implementation this may lead to an invalid address conversion. \r\n\r\nfixes #2931","created_at":"2016-10-06T15:57:23Z","updated_at":"2016-10-07T07:39:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f5a810a709092fe9bb4656f05d14f0ebdf2b6a86","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/2953/commits","review_comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/2953/comments","review_comment_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/2953/comments","statuses_url":"https://api.github.com/repos/ARMmbed/mbed-os/statuses/16c4da03e62fc2367b33be8bb9358c28804fffb3","head":{"label":"geky:nsapi-fix-ipv6-parsing","ref":"nsapi-fix-ipv6-parsing","sha":"16c4da03e62fc2367b33be8bb9358c28804fffb3","user":{"login":"geky","id":1075160,"avatar_url":"https://avatars.githubusercontent.com/u/1075160?v=3","gravatar_id":"","url":"https://api.github.com/users/geky","html_url":"https://github.com/geky","followers_url":"https://api.github.com/users/geky/followers","following_url":"https://api.github.com/users/geky/following{/other_user}","gists_url":"https://api.github.com/users/geky/gists{/gist_id}","starred_url":"https://api.github.com/users/geky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geky/subscriptions","organizations_url":"https://api.github.com/users/geky/orgs","repos_url":"https://api.github.com/users/geky/repos","events_url":"https://api.github.com/users/geky/events{/privacy}","received_events_url":"https://api.github.com/users/geky/received_events","type":"User","site_admin":false},"repo":{"id":59693534,"name":"mbed","full_name":"geky/mbed","owner":{"login":"geky","id":1075160,"avatar_url":"https://avatars.githubusercontent.com/u/1075160?v=3","gravatar_id":"","url":"https://api.github.com/users/geky","html_url":"https://github.com/geky","followers_url":"https://api.github.com/users/geky/followers","following_url":"https://api.github.com/users/geky/following{/other_user}","gists_url":"https://api.github.com/users/geky/gists{/gist_id}","starred_url":"https://api.github.com/users/geky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geky/subscriptions","organizations_url":"https://api.github.com/users/geky/orgs","repos_url":"https://api.github.com/users/geky/repos","events_url":"https://api.github.com/users/geky/events{/privacy}","received_events_url":"https://api.github.com/users/geky/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/geky/mbed","description":"mbed libraries and tools (Classic). For mbed OS, look here: https://www.mbed.com/en/development/software/mbed-os/","fork":true,"url":"https://api.github.com/repos/geky/mbed","forks_url":"https://api.github.com/repos/geky/mbed/forks","keys_url":"https://api.github.com/repos/geky/mbed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geky/mbed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geky/mbed/teams","hooks_url":"https://api.github.com/repos/geky/mbed/hooks","issue_events_url":"https://api.github.com/repos/geky/mbed/issues/events{/number}","events_url":"https://api.github.com/repos/geky/mbed/events","assignees_url":"https://api.github.com/repos/geky/mbed/assignees{/user}","branches_url":"https://api.github.com/repos/geky/mbed/branches{/branch}","tags_url":"https://api.github.com/repos/geky/mbed/tags","blobs_url":"https://api.github.com/repos/geky/mbed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geky/mbed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geky/mbed/git/refs{/sha}","trees_url":"https://api.github.com/repos/geky/mbed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geky/mbed/statuses/{sha}","languages_url":"https://api.github.com/repos/geky/mbed/languages","stargazers_url":"https://api.github.com/repos/geky/mbed/stargazers","contributors_url":"https://api.github.com/repos/geky/mbed/contributors","subscribers_url":"https://api.github.com/repos/geky/mbed/subscribers","subscription_url":"https://api.github.com/repos/geky/mbed/subscription","commits_url":"https://api.github.com/repos/geky/mbed/commits{/sha}","git_commits_url":"https://api.github.com/repos/geky/mbed/git/commits{/sha}","comments_url":"https://api.github.com/repos/geky/mbed/comments{/number}","issue_comment_url":"https://api.github.com/repos/geky/mbed/issues/comments{/number}","contents_url":"https://api.github.com/repos/geky/mbed/contents/{+path}","compare_url":"https://api.github.com/repos/geky/mbed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geky/mbed/merges","archive_url":"https://api.github.com/repos/geky/mbed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geky/mbed/downloads","issues_url":"https://api.github.com/repos/geky/mbed/issues{/number}","pulls_url":"https://api.github.com/repos/geky/mbed/pulls{/number}","milestones_url":"https://api.github.com/repos/geky/mbed/milestones{/number}","notifications_url":"https://api.github.com/repos/geky/mbed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geky/mbed/labels{/name}","releases_url":"https://api.github.com/repos/geky/mbed/releases{/id}","deployments_url":"https://api.github.com/repos/geky/mbed/deployments","created_at":"2016-05-25T19:59:10Z","updated_at":"2016-05-25T20:00:07Z","pushed_at":"2016-10-06T18:21:57Z","git_url":"git://github.com/geky/mbed.git","ssh_url":"git@github.com:geky/mbed.git","clone_url":"https://github.com/geky/mbed.git","svn_url":"https://github.com/geky/mbed","homepage":"","size":78803,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ARMmbed:master","ref":"master","sha":"670b0984ebf1207771ef5afbc1c64f85af349da1","user":{"login":"ARMmbed","id":8916057,"avatar_url":"https://avatars.githubusercontent.com/u/8916057?v=3","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"repo":{"id":8270972,"name":"mbed-os","full_name":"ARMmbed/mbed-os","owner":{"login":"ARMmbed","id":8916057,"avatar_url":"https://avatars.githubusercontent.com/u/8916057?v=3","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ARMmbed/mbed-os","description":"ARM mbed OS is a platform operating system designed for the internet of things","fork":false,"url":"https://api.github.com/repos/ARMmbed/mbed-os","forks_url":"https://api.github.com/repos/ARMmbed/mbed-os/forks","keys_url":"https://api.github.com/repos/ARMmbed/mbed-os/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ARMmbed/mbed-os/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ARMmbed/mbed-os/teams","hooks_url":"https://api.github.com/repos/ARMmbed/mbed-os/hooks","issue_events_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/events{/number}","events_url":"https://api.github.com/repos/ARMmbed/mbed-os/events","assignees_url":"https://api.github.com/repos/ARMmbed/mbed-os/assignees{/user}","branches_url":"https://api.github.com/repos/ARMmbed/mbed-os/branches{/branch}","tags_url":"https://api.github.com/repos/ARMmbed/mbed-os/tags","blobs_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/refs{/sha}","trees_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ARMmbed/mbed-os/statuses/{sha}","languages_url":"https://api.github.com/repos/ARMmbed/mbed-os/languages","stargazers_url":"https://api.github.com/repos/ARMmbed/mbed-os/stargazers","contributors_url":"https://api.github.com/repos/ARMmbed/mbed-os/contributors","subscribers_url":"https://api.github.com/repos/ARMmbed/mbed-os/subscribers","subscription_url":"https://api.github.com/repos/ARMmbed/mbed-os/subscription","commits_url":"https://api.github.com/repos/ARMmbed/mbed-os/commits{/sha}","git_commits_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/commits{/sha}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/comments{/number}","issue_comment_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/comments{/number}","contents_url":"https://api.github.com/repos/ARMmbed/mbed-os/contents/{+path}","compare_url":"https://api.github.com/repos/ARMmbed/mbed-os/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ARMmbed/mbed-os/merges","archive_url":"https://api.github.com/repos/ARMmbed/mbed-os/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ARMmbed/mbed-os/downloads","issues_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues{/number}","pulls_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls{/number}","milestones_url":"https://api.github.com/repos/ARMmbed/mbed-os/milestones{/number}","notifications_url":"https://api.github.com/repos/ARMmbed/mbed-os/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ARMmbed/mbed-os/labels{/name}","releases_url":"https://api.github.com/repos/ARMmbed/mbed-os/releases{/id}","deployments_url":"https://api.github.com/repos/ARMmbed/mbed-os/deployments","created_at":"2013-02-18T15:23:11Z","updated_at":"2016-10-07T04:42:54Z","pushed_at":"2016-10-07T07:12:29Z","git_url":"git://github.com/ARMmbed/mbed-os.git","ssh_url":"git@github.com:ARMmbed/mbed-os.git","clone_url":"https://github.com/ARMmbed/mbed-os.git","svn_url":"https://github.com/ARMmbed/mbed-os","homepage":"https://mbed.com","size":99690,"stargazers_count":770,"watchers_count":770,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":761,"mirror_url":null,"open_issues_count":357,"forks":761,"open_issues":357,"watchers":770,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/2953"},"html":{"href":"https://github.com/ARMmbed/mbed-os/pull/2953"},"issue":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/issues/2953"},"comments":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/issues/2953/comments"},"review_comments":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/2953/comments"},"review_comment":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/2953/commits"},"statuses":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/statuses/16c4da03e62fc2367b33be8bb9358c28804fffb3"}}}}
{"actor":{"display_login":"EduardPon"}}