{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/comments/40021947","id":40021947,"diff_hunk":"@@ -1202,18 +1202,9 @@ internal Object InternalGetValue(String name, Object defaultValue, bool doNotExp\n                         // make sure the string is null terminated before processing the data\n                         if (blob.Length > 0 && blob[blob.Length - 1] != (char)0)\n                         {\n-                            try\n-                            {\n-                                char[] newBlob = new char[checked(blob.Length + 1)];\n-                                Array.Copy(blob, 0, newBlob, 0, blob.Length);\n-                                newBlob[newBlob.Length - 1] = (char)0;\n-                                blob = newBlob;\n-                            }\n-                            catch (OverflowException e)\n-                            {\n-                                throw new IOException(SR.Arg_RegGetOverflowBug, e);\n-                            }\n-                            blob[blob.Length - 1] = (char)0;\n+                            char[] newBlob = new char[blob.Length + 1];\n+                            Array.Copy(blob, 0, newBlob, 0, blob.Length);\n+                            blob = newBlob;","path":"src/Microsoft.Win32.Registry/src/Microsoft/Win32/RegistryKey.cs","position":18,"original_position":18,"commit_id":"aeb988c6da579eefab9b2f4f784f98fe124e9562","original_commit_id":"aeb988c6da579eefab9b2f4f784f98fe124e9562","user":{"login":"jamesqo","id":9159214,"avatar_url":"https://avatars.githubusercontent.com/u/9159214?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesqo","html_url":"https://github.com/jamesqo","followers_url":"https://api.github.com/users/jamesqo/followers","following_url":"https://api.github.com/users/jamesqo/following{/other_user}","gists_url":"https://api.github.com/users/jamesqo/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesqo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesqo/subscriptions","organizations_url":"https://api.github.com/users/jamesqo/orgs","repos_url":"https://api.github.com/users/jamesqo/repos","events_url":"https://api.github.com/users/jamesqo/events{/privacy}","received_events_url":"https://api.github.com/users/jamesqo/received_events","type":"User","site_admin":false},"body":"@tarekgh Sorry, I thought I had pushed the commit already. That's strange...","created_at":"2015-09-21T20:33:00Z","updated_at":"2015-09-21T20:33:00Z","html_url":"https://github.com/dotnet/corefx/pull/3115#discussion_r40021947","pull_request_url":"https://api.github.com/repos/dotnet/corefx/pulls/3115","_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments/40021947"},"html":{"href":"https://github.com/dotnet/corefx/pull/3115#discussion_r40021947"},"pull_request":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/3115"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/3115","id":44383018,"html_url":"https://github.com/dotnet/corefx/pull/3115","diff_url":"https://github.com/dotnet/corefx/pull/3115.diff","patch_url":"https://github.com/dotnet/corefx/pull/3115.patch","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/3115","number":3115,"state":"open","locked":false,"title":"Remove redundant checks in RegistryKey","user":{"login":"jamesqo","id":9159214,"avatar_url":"https://avatars.githubusercontent.com/u/9159214?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesqo","html_url":"https://github.com/jamesqo","followers_url":"https://api.github.com/users/jamesqo/followers","following_url":"https://api.github.com/users/jamesqo/following{/other_user}","gists_url":"https://api.github.com/users/jamesqo/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesqo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesqo/subscriptions","organizations_url":"https://api.github.com/users/jamesqo/orgs","repos_url":"https://api.github.com/users/jamesqo/repos","events_url":"https://api.github.com/users/jamesqo/events{/privacy}","received_events_url":"https://api.github.com/users/jamesqo/received_events","type":"User","site_admin":false},"body":"Summary of changes:\r\n\r\n- Checked addition is unnecessary as we'll get an OOME before `blob.Length + 1` overflows\r\n- So we can remove the try/catch clauses\r\n- Memory is already 0-initialized, so we don't need to set it to 0","created_at":"2015-09-07T23:32:02Z","updated_at":"2015-09-21T20:33:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ec5ee118c5c6ccbe8ed4575607a6e4e44d0a180","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/corefx/pulls/3115/commits","review_comments_url":"https://api.github.com/repos/dotnet/corefx/pulls/3115/comments","review_comment_url":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/3115/comments","statuses_url":"https://api.github.com/repos/dotnet/corefx/statuses/aeb988c6da579eefab9b2f4f784f98fe124e9562","head":{"label":"jamesqo:registry-redundancies","ref":"registry-redundancies","sha":"aeb988c6da579eefab9b2f4f784f98fe124e9562","user":{"login":"jamesqo","id":9159214,"avatar_url":"https://avatars.githubusercontent.com/u/9159214?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesqo","html_url":"https://github.com/jamesqo","followers_url":"https://api.github.com/users/jamesqo/followers","following_url":"https://api.github.com/users/jamesqo/following{/other_user}","gists_url":"https://api.github.com/users/jamesqo/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesqo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesqo/subscriptions","organizations_url":"https://api.github.com/users/jamesqo/orgs","repos_url":"https://api.github.com/users/jamesqo/repos","events_url":"https://api.github.com/users/jamesqo/events{/privacy}","received_events_url":"https://api.github.com/users/jamesqo/received_events","type":"User","site_admin":false},"repo":{"id":37746383,"name":"corefx","full_name":"jamesqo/corefx","owner":{"login":"jamesqo","id":9159214,"avatar_url":"https://avatars.githubusercontent.com/u/9159214?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesqo","html_url":"https://github.com/jamesqo","followers_url":"https://api.github.com/users/jamesqo/followers","following_url":"https://api.github.com/users/jamesqo/following{/other_user}","gists_url":"https://api.github.com/users/jamesqo/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesqo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesqo/subscriptions","organizations_url":"https://api.github.com/users/jamesqo/orgs","repos_url":"https://api.github.com/users/jamesqo/repos","events_url":"https://api.github.com/users/jamesqo/events{/privacy}","received_events_url":"https://api.github.com/users/jamesqo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jamesqo/corefx","description":"This repo contains the .NET Core foundational libraries, called CoreFX. It includes classes for collections, file systems, console, XML, async and many others.","fork":true,"url":"https://api.github.com/repos/jamesqo/corefx","forks_url":"https://api.github.com/repos/jamesqo/corefx/forks","keys_url":"https://api.github.com/repos/jamesqo/corefx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jamesqo/corefx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jamesqo/corefx/teams","hooks_url":"https://api.github.com/repos/jamesqo/corefx/hooks","issue_events_url":"https://api.github.com/repos/jamesqo/corefx/issues/events{/number}","events_url":"https://api.github.com/repos/jamesqo/corefx/events","assignees_url":"https://api.github.com/repos/jamesqo/corefx/assignees{/user}","branches_url":"https://api.github.com/repos/jamesqo/corefx/branches{/branch}","tags_url":"https://api.github.com/repos/jamesqo/corefx/tags","blobs_url":"https://api.github.com/repos/jamesqo/corefx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jamesqo/corefx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jamesqo/corefx/git/refs{/sha}","trees_url":"https://api.github.com/repos/jamesqo/corefx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jamesqo/corefx/statuses/{sha}","languages_url":"https://api.github.com/repos/jamesqo/corefx/languages","stargazers_url":"https://api.github.com/repos/jamesqo/corefx/stargazers","contributors_url":"https://api.github.com/repos/jamesqo/corefx/contributors","subscribers_url":"https://api.github.com/repos/jamesqo/corefx/subscribers","subscription_url":"https://api.github.com/repos/jamesqo/corefx/subscription","commits_url":"https://api.github.com/repos/jamesqo/corefx/commits{/sha}","git_commits_url":"https://api.github.com/repos/jamesqo/corefx/git/commits{/sha}","comments_url":"https://api.github.com/repos/jamesqo/corefx/comments{/number}","issue_comment_url":"https://api.github.com/repos/jamesqo/corefx/issues/comments{/number}","contents_url":"https://api.github.com/repos/jamesqo/corefx/contents/{+path}","compare_url":"https://api.github.com/repos/jamesqo/corefx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jamesqo/corefx/merges","archive_url":"https://api.github.com/repos/jamesqo/corefx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jamesqo/corefx/downloads","issues_url":"https://api.github.com/repos/jamesqo/corefx/issues{/number}","pulls_url":"https://api.github.com/repos/jamesqo/corefx/pulls{/number}","milestones_url":"https://api.github.com/repos/jamesqo/corefx/milestones{/number}","notifications_url":"https://api.github.com/repos/jamesqo/corefx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jamesqo/corefx/labels{/name}","releases_url":"https://api.github.com/repos/jamesqo/corefx/releases{/id}","created_at":"2015-06-19T21:17:21Z","updated_at":"2015-08-30T20:27:03Z","pushed_at":"2015-09-20T04:37:02Z","git_url":"git://github.com/jamesqo/corefx.git","ssh_url":"git@github.com:jamesqo/corefx.git","clone_url":"https://github.com/jamesqo/corefx.git","svn_url":"https://github.com/jamesqo/corefx","homepage":"http://dotnet.github.io/core/","size":30647,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"f41c09dbb93723d62787e5b3973cd3fc8666fec8","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":26295345,"name":"corefx","full_name":"dotnet/corefx","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/corefx","description":"This repo contains the .NET Core foundational libraries, called CoreFX. It includes classes for collections, file systems, console, XML, async and many others.","fork":false,"url":"https://api.github.com/repos/dotnet/corefx","forks_url":"https://api.github.com/repos/dotnet/corefx/forks","keys_url":"https://api.github.com/repos/dotnet/corefx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/corefx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/corefx/teams","hooks_url":"https://api.github.com/repos/dotnet/corefx/hooks","issue_events_url":"https://api.github.com/repos/dotnet/corefx/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/corefx/events","assignees_url":"https://api.github.com/repos/dotnet/corefx/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/corefx/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/corefx/tags","blobs_url":"https://api.github.com/repos/dotnet/corefx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/corefx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/corefx/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/corefx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/corefx/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/corefx/languages","stargazers_url":"https://api.github.com/repos/dotnet/corefx/stargazers","contributors_url":"https://api.github.com/repos/dotnet/corefx/contributors","subscribers_url":"https://api.github.com/repos/dotnet/corefx/subscribers","subscription_url":"https://api.github.com/repos/dotnet/corefx/subscription","commits_url":"https://api.github.com/repos/dotnet/corefx/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/corefx/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/corefx/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/corefx/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/corefx/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/corefx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/corefx/merges","archive_url":"https://api.github.com/repos/dotnet/corefx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/corefx/downloads","issues_url":"https://api.github.com/repos/dotnet/corefx/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/corefx/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/corefx/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/corefx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/corefx/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/corefx/releases{/id}","created_at":"2014-11-06T23:42:48Z","updated_at":"2015-09-21T17:03:20Z","pushed_at":"2015-09-21T20:29:49Z","git_url":"git://github.com/dotnet/corefx.git","ssh_url":"git@github.com:dotnet/corefx.git","clone_url":"https://github.com/dotnet/corefx.git","svn_url":"https://github.com/dotnet/corefx","homepage":"http://dotnet.github.io/core/","size":68765,"stargazers_count":8366,"watchers_count":8366,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1804,"mirror_url":null,"open_issues_count":621,"forks":1804,"open_issues":621,"watchers":8366,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/3115"},"html":{"href":"https://github.com/dotnet/corefx/pull/3115"},"issue":{"href":"https://api.github.com/repos/dotnet/corefx/issues/3115"},"comments":{"href":"https://api.github.com/repos/dotnet/corefx/issues/3115/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/3115/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/3115/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/corefx/statuses/aeb988c6da579eefab9b2f4f784f98fe124e9562"}}}}