{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/85166678","pull_request_review_id":5897510,"id":85166678,"diff_hunk":"@@ -561,6 +561,13 @@ void ISerializable.GetObjectData(SerializationInfo info, StreamingContext contex\n             if (repeatCount==0) {\n                 return this;\n             }\n+\n+            // this is where we can check if the repeatCount will put us over m_MaxCapacity\n+            // We are doing the check here to prevent the corruption of the StringBuilder.\n+            if (Length + repeatCount > m_MaxCapacity || repeatCount + Length < repeatCount) {","path":"src/mscorlib/src/System/Text/StringBuilder.cs","position":null,"original_position":7,"commit_id":"ead3eaa818f1675ea1bc8c2b99f81deecad3066d","original_commit_id":"46b2abef1c7fef181f17f3102f15fb7da1461a8b","user":{"login":"AlexGhiondea","id":8396979,"avatar_url":"https://avatars.githubusercontent.com/u/8396979?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexGhiondea","html_url":"https://github.com/AlexGhiondea","followers_url":"https://api.github.com/users/AlexGhiondea/followers","following_url":"https://api.github.com/users/AlexGhiondea/following{/other_user}","gists_url":"https://api.github.com/users/AlexGhiondea/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexGhiondea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexGhiondea/subscriptions","organizations_url":"https://api.github.com/users/AlexGhiondea/orgs","repos_url":"https://api.github.com/users/AlexGhiondea/repos","events_url":"https://api.github.com/users/AlexGhiondea/events{/privacy}","received_events_url":"https://api.github.com/users/AlexGhiondea/received_events","type":"User","site_admin":false},"body":"Done!","created_at":"2016-10-26T16:39:30Z","updated_at":"2016-10-26T16:39:30Z","html_url":"https://github.com/dotnet/coreclr/pull/7803#discussion_r85166678","pull_request_url":"https://api.github.com/repos/dotnet/coreclr/pulls/7803","_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/85166678"},"html":{"href":"https://github.com/dotnet/coreclr/pull/7803#discussion_r85166678"},"pull_request":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/7803"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/7803","id":90889242,"html_url":"https://github.com/dotnet/coreclr/pull/7803","diff_url":"https://github.com/dotnet/coreclr/pull/7803.diff","patch_url":"https://github.com/dotnet/coreclr/pull/7803.patch","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/7803","number":7803,"state":"open","locked":false,"title":"Make sure that when the StringBuilder.Append method is called we firs…","user":{"login":"AlexGhiondea","id":8396979,"avatar_url":"https://avatars.githubusercontent.com/u/8396979?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexGhiondea","html_url":"https://github.com/AlexGhiondea","followers_url":"https://api.github.com/users/AlexGhiondea/followers","following_url":"https://api.github.com/users/AlexGhiondea/following{/other_user}","gists_url":"https://api.github.com/users/AlexGhiondea/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexGhiondea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexGhiondea/subscriptions","organizations_url":"https://api.github.com/users/AlexGhiondea/orgs","repos_url":"https://api.github.com/users/AlexGhiondea/repos","events_url":"https://api.github.com/users/AlexGhiondea/events{/privacy}","received_events_url":"https://api.github.com/users/AlexGhiondea/received_events","type":"User","site_admin":false},"body":"…t check that we can insert as many characters as were requested before we actually start writting them into the StringBuilder.\r\n\r\nThis will prevent the case when we realize that there is not enough space in the StringBuilder (and we cannot grow it as much as it is requested) after we already wrote stuff in it.\r\n\r\nFixes #4514 ","created_at":"2016-10-25T20:52:04Z","updated_at":"2016-10-26T16:39:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d2c3fcbea588249b08f64b2e54c2511519833cb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/coreclr/pulls/7803/commits","review_comments_url":"https://api.github.com/repos/dotnet/coreclr/pulls/7803/comments","review_comment_url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/7803/comments","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/ead3eaa818f1675ea1bc8c2b99f81deecad3066d","head":{"label":"AlexGhiondea:Fix_SB","ref":"Fix_SB","sha":"ead3eaa818f1675ea1bc8c2b99f81deecad3066d","user":{"login":"AlexGhiondea","id":8396979,"avatar_url":"https://avatars.githubusercontent.com/u/8396979?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexGhiondea","html_url":"https://github.com/AlexGhiondea","followers_url":"https://api.github.com/users/AlexGhiondea/followers","following_url":"https://api.github.com/users/AlexGhiondea/following{/other_user}","gists_url":"https://api.github.com/users/AlexGhiondea/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexGhiondea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexGhiondea/subscriptions","organizations_url":"https://api.github.com/users/AlexGhiondea/orgs","repos_url":"https://api.github.com/users/AlexGhiondea/repos","events_url":"https://api.github.com/users/AlexGhiondea/events{/privacy}","received_events_url":"https://api.github.com/users/AlexGhiondea/received_events","type":"User","site_admin":false},"repo":{"id":30256625,"name":"coreclr","full_name":"AlexGhiondea/coreclr","owner":{"login":"AlexGhiondea","id":8396979,"avatar_url":"https://avatars.githubusercontent.com/u/8396979?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexGhiondea","html_url":"https://github.com/AlexGhiondea","followers_url":"https://api.github.com/users/AlexGhiondea/followers","following_url":"https://api.github.com/users/AlexGhiondea/following{/other_user}","gists_url":"https://api.github.com/users/AlexGhiondea/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexGhiondea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexGhiondea/subscriptions","organizations_url":"https://api.github.com/users/AlexGhiondea/orgs","repos_url":"https://api.github.com/users/AlexGhiondea/repos","events_url":"https://api.github.com/users/AlexGhiondea/events{/privacy}","received_events_url":"https://api.github.com/users/AlexGhiondea/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AlexGhiondea/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR. It is an execution engine for .NET apps, performing functions such as IL byte code loading, compilation to machine code and garbage collection. The repo contains the complete up-to-date CoreCLR codebase.","fork":true,"url":"https://api.github.com/repos/AlexGhiondea/coreclr","forks_url":"https://api.github.com/repos/AlexGhiondea/coreclr/forks","keys_url":"https://api.github.com/repos/AlexGhiondea/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlexGhiondea/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlexGhiondea/coreclr/teams","hooks_url":"https://api.github.com/repos/AlexGhiondea/coreclr/hooks","issue_events_url":"https://api.github.com/repos/AlexGhiondea/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/AlexGhiondea/coreclr/events","assignees_url":"https://api.github.com/repos/AlexGhiondea/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/AlexGhiondea/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/AlexGhiondea/coreclr/tags","blobs_url":"https://api.github.com/repos/AlexGhiondea/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlexGhiondea/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlexGhiondea/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlexGhiondea/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlexGhiondea/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/AlexGhiondea/coreclr/languages","stargazers_url":"https://api.github.com/repos/AlexGhiondea/coreclr/stargazers","contributors_url":"https://api.github.com/repos/AlexGhiondea/coreclr/contributors","subscribers_url":"https://api.github.com/repos/AlexGhiondea/coreclr/subscribers","subscription_url":"https://api.github.com/repos/AlexGhiondea/coreclr/subscription","commits_url":"https://api.github.com/repos/AlexGhiondea/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlexGhiondea/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlexGhiondea/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlexGhiondea/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/AlexGhiondea/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/AlexGhiondea/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlexGhiondea/coreclr/merges","archive_url":"https://api.github.com/repos/AlexGhiondea/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlexGhiondea/coreclr/downloads","issues_url":"https://api.github.com/repos/AlexGhiondea/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/AlexGhiondea/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/AlexGhiondea/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/AlexGhiondea/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlexGhiondea/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/AlexGhiondea/coreclr/releases{/id}","deployments_url":"https://api.github.com/repos/AlexGhiondea/coreclr/deployments","created_at":"2015-02-03T18:00:03Z","updated_at":"2016-10-22T06:20:52Z","pushed_at":"2016-10-26T16:39:07Z","git_url":"git://github.com/AlexGhiondea/coreclr.git","ssh_url":"git@github.com:AlexGhiondea/coreclr.git","clone_url":"https://github.com/AlexGhiondea/coreclr.git","svn_url":"https://github.com/AlexGhiondea/coreclr","homepage":"","size":112528,"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":"dotnet:master","ref":"master","sha":"de791ced486cc21b39903b534bff4e41a794a981","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":30092893,"name":"coreclr","full_name":"dotnet/coreclr","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/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR, and the base library, called mscorlib. It includes the garbage collector, JIT compiler, base .NET data types and many low-level classes.","fork":false,"url":"https://api.github.com/repos/dotnet/coreclr","forks_url":"https://api.github.com/repos/dotnet/coreclr/forks","keys_url":"https://api.github.com/repos/dotnet/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/coreclr/teams","hooks_url":"https://api.github.com/repos/dotnet/coreclr/hooks","issue_events_url":"https://api.github.com/repos/dotnet/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/coreclr/events","assignees_url":"https://api.github.com/repos/dotnet/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/coreclr/tags","blobs_url":"https://api.github.com/repos/dotnet/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/coreclr/languages","stargazers_url":"https://api.github.com/repos/dotnet/coreclr/stargazers","contributors_url":"https://api.github.com/repos/dotnet/coreclr/contributors","subscribers_url":"https://api.github.com/repos/dotnet/coreclr/subscribers","subscription_url":"https://api.github.com/repos/dotnet/coreclr/subscription","commits_url":"https://api.github.com/repos/dotnet/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/coreclr/merges","archive_url":"https://api.github.com/repos/dotnet/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/coreclr/downloads","issues_url":"https://api.github.com/repos/dotnet/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/coreclr/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/coreclr/deployments","created_at":"2015-01-30T22:10:02Z","updated_at":"2016-10-26T04:59:08Z","pushed_at":"2016-10-26T16:39:08Z","git_url":"git://github.com/dotnet/coreclr.git","ssh_url":"git@github.com:dotnet/coreclr.git","clone_url":"https://github.com/dotnet/coreclr.git","svn_url":"https://github.com/dotnet/coreclr","homepage":"https://docs.microsoft.com/dotnet/","size":127876,"stargazers_count":6981,"watchers_count":6981,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1690,"mirror_url":null,"open_issues_count":997,"forks":1690,"open_issues":997,"watchers":6981,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/7803"},"html":{"href":"https://github.com/dotnet/coreclr/pull/7803"},"issue":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/7803"},"comments":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/7803/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/7803/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/7803/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/coreclr/statuses/ead3eaa818f1675ea1bc8c2b99f81deecad3066d"}}}}
{"actor":{"display_login":"AlexGhiondea"}}