{"action":"created","comment":{"url":"https://api.github.com/repos/libgit2/libgit2/pulls/comments/22689576","id":22689576,"diff_hunk":"@@ -0,0 +1,20 @@\n+#include \"clar_libgit2.h\"\n+#include \"buffer.h\"\n+\n+#if defined(GIT_ARCH_64)\n+# define TOOBIG 0xffffffffffffff00\n+#else\n+# define TOOBIG 0xffffff00\n+#endif\n+\n+void test_buf_oom__grow(void)\n+{\n+\tgit_buf buf = GIT_BUF_INIT;\n+\n+\tgit_buf_clear(&buf);\n+\n+\tcl_assert( git_buf_grow(&buf, TOOBIG) == -1 );\n+\tcl_assert( git_buf_oom(&buf) );","path":"tests/buf/oom.c","position":17,"original_position":17,"commit_id":"8f2cd704450a59cdadd2b9e3661e506bc0d90a25","original_commit_id":"8f2cd704450a59cdadd2b9e3661e506bc0d90a25","user":{"login":"ethomson","id":1130014,"avatar_url":"https://avatars.githubusercontent.com/u/1130014?v=3","gravatar_id":"","url":"https://api.github.com/users/ethomson","html_url":"https://github.com/ethomson","followers_url":"https://api.github.com/users/ethomson/followers","following_url":"https://api.github.com/users/ethomson/following{/other_user}","gists_url":"https://api.github.com/users/ethomson/gists{/gist_id}","starred_url":"https://api.github.com/users/ethomson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethomson/subscriptions","organizations_url":"https://api.github.com/users/ethomson/orgs","repos_url":"https://api.github.com/users/ethomson/repos","events_url":"https://api.github.com/users/ethomson/events{/privacy}","received_events_url":"https://api.github.com/users/ethomson/received_events","type":"User","site_admin":false},"body":"also, super pedantic - we don't put whitespace here...","created_at":"2015-01-08T22:52:19Z","updated_at":"2015-01-08T22:52:19Z","html_url":"https://github.com/libgit2/libgit2/pull/2813#discussion_r22689576","pull_request_url":"https://api.github.com/repos/libgit2/libgit2/pulls/2813","_links":{"self":{"href":"https://api.github.com/repos/libgit2/libgit2/pulls/comments/22689576"},"html":{"href":"https://github.com/libgit2/libgit2/pull/2813#discussion_r22689576"},"pull_request":{"href":"https://api.github.com/repos/libgit2/libgit2/pulls/2813"}}},"pull_request":{"url":"https://api.github.com/repos/libgit2/libgit2/pulls/2813","id":27065439,"html_url":"https://github.com/libgit2/libgit2/pull/2813","diff_url":"https://github.com/libgit2/libgit2/pull/2813.diff","patch_url":"https://github.com/libgit2/libgit2/pull/2813.patch","issue_url":"https://api.github.com/repos/libgit2/libgit2/issues/2813","number":2813,"state":"open","locked":false,"title":"Fix crash in free() when git_buf_grow() fails.","user":{"login":"jeffhostetler","id":7493832,"avatar_url":"https://avatars.githubusercontent.com/u/7493832?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffhostetler","html_url":"https://github.com/jeffhostetler","followers_url":"https://api.github.com/users/jeffhostetler/followers","following_url":"https://api.github.com/users/jeffhostetler/following{/other_user}","gists_url":"https://api.github.com/users/jeffhostetler/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffhostetler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffhostetler/subscriptions","organizations_url":"https://api.github.com/users/jeffhostetler/orgs","repos_url":"https://api.github.com/users/jeffhostetler/repos","events_url":"https://api.github.com/users/jeffhostetler/events{/privacy}","received_events_url":"https://api.github.com/users/jeffhostetler/received_events","type":"User","site_admin":false},"body":"Don't try to free static buffer when realloc fails in git_buf_grow.","created_at":"2015-01-08T22:30:02Z","updated_at":"2015-01-08T22:52:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb59b0e56cec6a7ef1d111d455efb45f83fa5191","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/libgit2/libgit2/pulls/2813/commits","review_comments_url":"https://api.github.com/repos/libgit2/libgit2/pulls/2813/comments","review_comment_url":"https://api.github.com/repos/libgit2/libgit2/pulls/comments/{number}","comments_url":"https://api.github.com/repos/libgit2/libgit2/issues/2813/comments","statuses_url":"https://api.github.com/repos/libgit2/libgit2/statuses/8f2cd704450a59cdadd2b9e3661e506bc0d90a25","head":{"label":"jeffhostetler:jeffhostetler/buf_oom_crash","ref":"jeffhostetler/buf_oom_crash","sha":"8f2cd704450a59cdadd2b9e3661e506bc0d90a25","user":{"login":"jeffhostetler","id":7493832,"avatar_url":"https://avatars.githubusercontent.com/u/7493832?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffhostetler","html_url":"https://github.com/jeffhostetler","followers_url":"https://api.github.com/users/jeffhostetler/followers","following_url":"https://api.github.com/users/jeffhostetler/following{/other_user}","gists_url":"https://api.github.com/users/jeffhostetler/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffhostetler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffhostetler/subscriptions","organizations_url":"https://api.github.com/users/jeffhostetler/orgs","repos_url":"https://api.github.com/users/jeffhostetler/repos","events_url":"https://api.github.com/users/jeffhostetler/events{/privacy}","received_events_url":"https://api.github.com/users/jeffhostetler/received_events","type":"User","site_admin":false},"repo":{"id":27178779,"name":"public_libgit2","full_name":"jeffhostetler/public_libgit2","owner":{"login":"jeffhostetler","id":7493832,"avatar_url":"https://avatars.githubusercontent.com/u/7493832?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffhostetler","html_url":"https://github.com/jeffhostetler","followers_url":"https://api.github.com/users/jeffhostetler/followers","following_url":"https://api.github.com/users/jeffhostetler/following{/other_user}","gists_url":"https://api.github.com/users/jeffhostetler/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffhostetler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffhostetler/subscriptions","organizations_url":"https://api.github.com/users/jeffhostetler/orgs","repos_url":"https://api.github.com/users/jeffhostetler/repos","events_url":"https://api.github.com/users/jeffhostetler/events{/privacy}","received_events_url":"https://api.github.com/users/jeffhostetler/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jeffhostetler/public_libgit2","description":"The Library","fork":true,"url":"https://api.github.com/repos/jeffhostetler/public_libgit2","forks_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/forks","keys_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/teams","hooks_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/hooks","issue_events_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/issues/events{/number}","events_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/events","assignees_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/assignees{/user}","branches_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/branches{/branch}","tags_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/tags","blobs_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/git/refs{/sha}","trees_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/statuses/{sha}","languages_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/languages","stargazers_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/stargazers","contributors_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/contributors","subscribers_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/subscribers","subscription_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/subscription","commits_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/commits{/sha}","git_commits_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/git/commits{/sha}","comments_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/comments{/number}","issue_comment_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/issues/comments/{number}","contents_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/contents/{+path}","compare_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/merges","archive_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/downloads","issues_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/issues{/number}","pulls_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/pulls{/number}","milestones_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/milestones{/number}","notifications_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/labels{/name}","releases_url":"https://api.github.com/repos/jeffhostetler/public_libgit2/releases{/id}","created_at":"2014-11-26T13:47:41Z","updated_at":"2015-01-03T00:06:47Z","pushed_at":"2015-01-08T22:25:07Z","git_url":"git://github.com/jeffhostetler/public_libgit2.git","ssh_url":"git@github.com:jeffhostetler/public_libgit2.git","clone_url":"https://github.com/jeffhostetler/public_libgit2.git","svn_url":"https://github.com/jeffhostetler/public_libgit2","homepage":"http://libgit2.github.com","size":23492,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"libgit2:master","ref":"master","sha":"1646412d8fc9e1532a194df2515e9a5fde4da988","user":{"login":"libgit2","id":394745,"avatar_url":"https://avatars.githubusercontent.com/u/394745?v=3","gravatar_id":"","url":"https://api.github.com/users/libgit2","html_url":"https://github.com/libgit2","followers_url":"https://api.github.com/users/libgit2/followers","following_url":"https://api.github.com/users/libgit2/following{/other_user}","gists_url":"https://api.github.com/users/libgit2/gists{/gist_id}","starred_url":"https://api.github.com/users/libgit2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libgit2/subscriptions","organizations_url":"https://api.github.com/users/libgit2/orgs","repos_url":"https://api.github.com/users/libgit2/repos","events_url":"https://api.github.com/users/libgit2/events{/privacy}","received_events_url":"https://api.github.com/users/libgit2/received_events","type":"Organization","site_admin":false},"repo":{"id":901662,"name":"libgit2","full_name":"libgit2/libgit2","owner":{"login":"libgit2","id":394745,"avatar_url":"https://avatars.githubusercontent.com/u/394745?v=3","gravatar_id":"","url":"https://api.github.com/users/libgit2","html_url":"https://github.com/libgit2","followers_url":"https://api.github.com/users/libgit2/followers","following_url":"https://api.github.com/users/libgit2/following{/other_user}","gists_url":"https://api.github.com/users/libgit2/gists{/gist_id}","starred_url":"https://api.github.com/users/libgit2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libgit2/subscriptions","organizations_url":"https://api.github.com/users/libgit2/orgs","repos_url":"https://api.github.com/users/libgit2/repos","events_url":"https://api.github.com/users/libgit2/events{/privacy}","received_events_url":"https://api.github.com/users/libgit2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libgit2/libgit2","description":"The Library","fork":false,"url":"https://api.github.com/repos/libgit2/libgit2","forks_url":"https://api.github.com/repos/libgit2/libgit2/forks","keys_url":"https://api.github.com/repos/libgit2/libgit2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libgit2/libgit2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libgit2/libgit2/teams","hooks_url":"https://api.github.com/repos/libgit2/libgit2/hooks","issue_events_url":"https://api.github.com/repos/libgit2/libgit2/issues/events{/number}","events_url":"https://api.github.com/repos/libgit2/libgit2/events","assignees_url":"https://api.github.com/repos/libgit2/libgit2/assignees{/user}","branches_url":"https://api.github.com/repos/libgit2/libgit2/branches{/branch}","tags_url":"https://api.github.com/repos/libgit2/libgit2/tags","blobs_url":"https://api.github.com/repos/libgit2/libgit2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libgit2/libgit2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libgit2/libgit2/git/refs{/sha}","trees_url":"https://api.github.com/repos/libgit2/libgit2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libgit2/libgit2/statuses/{sha}","languages_url":"https://api.github.com/repos/libgit2/libgit2/languages","stargazers_url":"https://api.github.com/repos/libgit2/libgit2/stargazers","contributors_url":"https://api.github.com/repos/libgit2/libgit2/contributors","subscribers_url":"https://api.github.com/repos/libgit2/libgit2/subscribers","subscription_url":"https://api.github.com/repos/libgit2/libgit2/subscription","commits_url":"https://api.github.com/repos/libgit2/libgit2/commits{/sha}","git_commits_url":"https://api.github.com/repos/libgit2/libgit2/git/commits{/sha}","comments_url":"https://api.github.com/repos/libgit2/libgit2/comments{/number}","issue_comment_url":"https://api.github.com/repos/libgit2/libgit2/issues/comments/{number}","contents_url":"https://api.github.com/repos/libgit2/libgit2/contents/{+path}","compare_url":"https://api.github.com/repos/libgit2/libgit2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libgit2/libgit2/merges","archive_url":"https://api.github.com/repos/libgit2/libgit2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libgit2/libgit2/downloads","issues_url":"https://api.github.com/repos/libgit2/libgit2/issues{/number}","pulls_url":"https://api.github.com/repos/libgit2/libgit2/pulls{/number}","milestones_url":"https://api.github.com/repos/libgit2/libgit2/milestones{/number}","notifications_url":"https://api.github.com/repos/libgit2/libgit2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libgit2/libgit2/labels{/name}","releases_url":"https://api.github.com/repos/libgit2/libgit2/releases{/id}","created_at":"2010-09-10T16:17:48Z","updated_at":"2015-01-08T17:20:48Z","pushed_at":"2015-01-08T17:20:44Z","git_url":"git://github.com/libgit2/libgit2.git","ssh_url":"git@github.com:libgit2/libgit2.git","clone_url":"https://github.com/libgit2/libgit2.git","svn_url":"https://github.com/libgit2/libgit2","homepage":"http://libgit2.github.com","size":96229,"stargazers_count":4697,"watchers_count":4697,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1080,"mirror_url":null,"open_issues_count":110,"forks":1080,"open_issues":110,"watchers":4697,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/libgit2/libgit2/pulls/2813"},"html":{"href":"https://github.com/libgit2/libgit2/pull/2813"},"issue":{"href":"https://api.github.com/repos/libgit2/libgit2/issues/2813"},"comments":{"href":"https://api.github.com/repos/libgit2/libgit2/issues/2813/comments"},"review_comments":{"href":"https://api.github.com/repos/libgit2/libgit2/pulls/2813/comments"},"review_comment":{"href":"https://api.github.com/repos/libgit2/libgit2/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/libgit2/libgit2/pulls/2813/commits"},"statuses":{"href":"https://api.github.com/repos/libgit2/libgit2/statuses/8f2cd704450a59cdadd2b9e3661e506bc0d90a25"}}}}