{"action":"created","comment":{"url":"https://api.github.com/repos/JFreegman/toxcore/pulls/comments/39903924","id":39903924,"diff_hunk":"@@ -60,8 +60,15 @@ int mod_list_unpack(GC_Chat *chat, const uint8_t *data, uint32_t length, uint32_\n     for (i = 0; i < num_mods; ++i) {\n         tmp_list[i] = malloc(sizeof(uint8_t) * GC_MOD_LIST_ENTRY_SIZE);\n \n-        if (tmp_list[i] == NULL)\n+        if (tmp_list[i] == NULL) {","path":"toxcore/group_moderation.c","position":5,"original_position":5,"commit_id":"46d3e0dc7f1c79d98cc92cd4f2b7a7397e086bc7","original_commit_id":"46d3e0dc7f1c79d98cc92cd4f2b7a7397e086bc7","user":{"login":"JFreegman","id":1646057,"avatar_url":"https://avatars.githubusercontent.com/u/1646057?v=3","gravatar_id":"","url":"https://api.github.com/users/JFreegman","html_url":"https://github.com/JFreegman","followers_url":"https://api.github.com/users/JFreegman/followers","following_url":"https://api.github.com/users/JFreegman/following{/other_user}","gists_url":"https://api.github.com/users/JFreegman/gists{/gist_id}","starred_url":"https://api.github.com/users/JFreegman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JFreegman/subscriptions","organizations_url":"https://api.github.com/users/JFreegman/orgs","repos_url":"https://api.github.com/users/JFreegman/repos","events_url":"https://api.github.com/users/JFreegman/events{/privacy}","received_events_url":"https://api.github.com/users/JFreegman/received_events","type":"User","site_admin":false},"body":"This is ugly. Just add the line: `free_uint8_t_pointer_array(tmp_list, i);`","created_at":"2015-09-18T21:39:24Z","updated_at":"2015-09-18T21:39:24Z","html_url":"https://github.com/JFreegman/toxcore/pull/15#discussion_r39903924","pull_request_url":"https://api.github.com/repos/JFreegman/toxcore/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/JFreegman/toxcore/pulls/comments/39903924"},"html":{"href":"https://github.com/JFreegman/toxcore/pull/15#discussion_r39903924"},"pull_request":{"href":"https://api.github.com/repos/JFreegman/toxcore/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/JFreegman/toxcore/pulls/15","id":45448855,"html_url":"https://github.com/JFreegman/toxcore/pull/15","diff_url":"https://github.com/JFreegman/toxcore/pull/15.diff","patch_url":"https://github.com/JFreegman/toxcore/pull/15.patch","issue_url":"https://api.github.com/repos/JFreegman/toxcore/issues/15","number":15,"state":"open","locked":false,"title":"Fix possible memory corruption after realloc and memory leaks","user":{"login":"abbat","id":802583,"avatar_url":"https://avatars.githubusercontent.com/u/802583?v=3","gravatar_id":"","url":"https://api.github.com/users/abbat","html_url":"https://github.com/abbat","followers_url":"https://api.github.com/users/abbat/followers","following_url":"https://api.github.com/users/abbat/following{/other_user}","gists_url":"https://api.github.com/users/abbat/gists{/gist_id}","starred_url":"https://api.github.com/users/abbat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abbat/subscriptions","organizations_url":"https://api.github.com/users/abbat/orgs","repos_url":"https://api.github.com/users/abbat/repos","events_url":"https://api.github.com/users/abbat/events{/privacy}","received_events_url":"https://api.github.com/users/abbat/received_events","type":"User","site_admin":false},"body":"realloc can move memory block, so if we do not store pointer to it (if next malloc/realloc failed) we can get pointer to invalid memory block and crash application on next access.\r\n","created_at":"2015-09-18T20:26:02Z","updated_at":"2015-09-18T21:39:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d9421892006cb27a64e91b339c75a1906fff3c6d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/JFreegman/toxcore/pulls/15/commits","review_comments_url":"https://api.github.com/repos/JFreegman/toxcore/pulls/15/comments","review_comment_url":"https://api.github.com/repos/JFreegman/toxcore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JFreegman/toxcore/issues/15/comments","statuses_url":"https://api.github.com/repos/JFreegman/toxcore/statuses/46d3e0dc7f1c79d98cc92cd4f2b7a7397e086bc7","head":{"label":"abbat:new_groupchats","ref":"new_groupchats","sha":"46d3e0dc7f1c79d98cc92cd4f2b7a7397e086bc7","user":{"login":"abbat","id":802583,"avatar_url":"https://avatars.githubusercontent.com/u/802583?v=3","gravatar_id":"","url":"https://api.github.com/users/abbat","html_url":"https://github.com/abbat","followers_url":"https://api.github.com/users/abbat/followers","following_url":"https://api.github.com/users/abbat/following{/other_user}","gists_url":"https://api.github.com/users/abbat/gists{/gist_id}","starred_url":"https://api.github.com/users/abbat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abbat/subscriptions","organizations_url":"https://api.github.com/users/abbat/orgs","repos_url":"https://api.github.com/users/abbat/repos","events_url":"https://api.github.com/users/abbat/events{/privacy}","received_events_url":"https://api.github.com/users/abbat/received_events","type":"User","site_admin":false},"repo":{"id":42681893,"name":"toxcore","full_name":"abbat/toxcore","owner":{"login":"abbat","id":802583,"avatar_url":"https://avatars.githubusercontent.com/u/802583?v=3","gravatar_id":"","url":"https://api.github.com/users/abbat","html_url":"https://github.com/abbat","followers_url":"https://api.github.com/users/abbat/followers","following_url":"https://api.github.com/users/abbat/following{/other_user}","gists_url":"https://api.github.com/users/abbat/gists{/gist_id}","starred_url":"https://api.github.com/users/abbat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abbat/subscriptions","organizations_url":"https://api.github.com/users/abbat/orgs","repos_url":"https://api.github.com/users/abbat/repos","events_url":"https://api.github.com/users/abbat/events{/privacy}","received_events_url":"https://api.github.com/users/abbat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abbat/toxcore","description":"Free as in freedom Skype replacement.","fork":true,"url":"https://api.github.com/repos/abbat/toxcore","forks_url":"https://api.github.com/repos/abbat/toxcore/forks","keys_url":"https://api.github.com/repos/abbat/toxcore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abbat/toxcore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abbat/toxcore/teams","hooks_url":"https://api.github.com/repos/abbat/toxcore/hooks","issue_events_url":"https://api.github.com/repos/abbat/toxcore/issues/events{/number}","events_url":"https://api.github.com/repos/abbat/toxcore/events","assignees_url":"https://api.github.com/repos/abbat/toxcore/assignees{/user}","branches_url":"https://api.github.com/repos/abbat/toxcore/branches{/branch}","tags_url":"https://api.github.com/repos/abbat/toxcore/tags","blobs_url":"https://api.github.com/repos/abbat/toxcore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abbat/toxcore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abbat/toxcore/git/refs{/sha}","trees_url":"https://api.github.com/repos/abbat/toxcore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abbat/toxcore/statuses/{sha}","languages_url":"https://api.github.com/repos/abbat/toxcore/languages","stargazers_url":"https://api.github.com/repos/abbat/toxcore/stargazers","contributors_url":"https://api.github.com/repos/abbat/toxcore/contributors","subscribers_url":"https://api.github.com/repos/abbat/toxcore/subscribers","subscription_url":"https://api.github.com/repos/abbat/toxcore/subscription","commits_url":"https://api.github.com/repos/abbat/toxcore/commits{/sha}","git_commits_url":"https://api.github.com/repos/abbat/toxcore/git/commits{/sha}","comments_url":"https://api.github.com/repos/abbat/toxcore/comments{/number}","issue_comment_url":"https://api.github.com/repos/abbat/toxcore/issues/comments{/number}","contents_url":"https://api.github.com/repos/abbat/toxcore/contents/{+path}","compare_url":"https://api.github.com/repos/abbat/toxcore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abbat/toxcore/merges","archive_url":"https://api.github.com/repos/abbat/toxcore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abbat/toxcore/downloads","issues_url":"https://api.github.com/repos/abbat/toxcore/issues{/number}","pulls_url":"https://api.github.com/repos/abbat/toxcore/pulls{/number}","milestones_url":"https://api.github.com/repos/abbat/toxcore/milestones{/number}","notifications_url":"https://api.github.com/repos/abbat/toxcore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abbat/toxcore/labels{/name}","releases_url":"https://api.github.com/repos/abbat/toxcore/releases{/id}","created_at":"2015-09-17T21:04:46Z","updated_at":"2015-09-17T21:04:47Z","pushed_at":"2015-09-18T20:20:37Z","git_url":"git://github.com/abbat/toxcore.git","ssh_url":"git@github.com:abbat/toxcore.git","clone_url":"https://github.com/abbat/toxcore.git","svn_url":"https://github.com/abbat/toxcore","homepage":"http://tox.chat","size":12754,"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":"new_groupchats"}},"base":{"label":"JFreegman:new_groupchats","ref":"new_groupchats","sha":"6b2b5b50a1a4d3266eafe5f32b15faf973d4c94d","user":{"login":"JFreegman","id":1646057,"avatar_url":"https://avatars.githubusercontent.com/u/1646057?v=3","gravatar_id":"","url":"https://api.github.com/users/JFreegman","html_url":"https://github.com/JFreegman","followers_url":"https://api.github.com/users/JFreegman/followers","following_url":"https://api.github.com/users/JFreegman/following{/other_user}","gists_url":"https://api.github.com/users/JFreegman/gists{/gist_id}","starred_url":"https://api.github.com/users/JFreegman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JFreegman/subscriptions","organizations_url":"https://api.github.com/users/JFreegman/orgs","repos_url":"https://api.github.com/users/JFreegman/repos","events_url":"https://api.github.com/users/JFreegman/events{/privacy}","received_events_url":"https://api.github.com/users/JFreegman/received_events","type":"User","site_admin":false},"repo":{"id":17730514,"name":"toxcore","full_name":"JFreegman/toxcore","owner":{"login":"JFreegman","id":1646057,"avatar_url":"https://avatars.githubusercontent.com/u/1646057?v=3","gravatar_id":"","url":"https://api.github.com/users/JFreegman","html_url":"https://github.com/JFreegman","followers_url":"https://api.github.com/users/JFreegman/followers","following_url":"https://api.github.com/users/JFreegman/following{/other_user}","gists_url":"https://api.github.com/users/JFreegman/gists{/gist_id}","starred_url":"https://api.github.com/users/JFreegman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JFreegman/subscriptions","organizations_url":"https://api.github.com/users/JFreegman/orgs","repos_url":"https://api.github.com/users/JFreegman/repos","events_url":"https://api.github.com/users/JFreegman/events{/privacy}","received_events_url":"https://api.github.com/users/JFreegman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JFreegman/toxcore","description":"Free as in freedom Skype replacement.","fork":true,"url":"https://api.github.com/repos/JFreegman/toxcore","forks_url":"https://api.github.com/repos/JFreegman/toxcore/forks","keys_url":"https://api.github.com/repos/JFreegman/toxcore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JFreegman/toxcore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JFreegman/toxcore/teams","hooks_url":"https://api.github.com/repos/JFreegman/toxcore/hooks","issue_events_url":"https://api.github.com/repos/JFreegman/toxcore/issues/events{/number}","events_url":"https://api.github.com/repos/JFreegman/toxcore/events","assignees_url":"https://api.github.com/repos/JFreegman/toxcore/assignees{/user}","branches_url":"https://api.github.com/repos/JFreegman/toxcore/branches{/branch}","tags_url":"https://api.github.com/repos/JFreegman/toxcore/tags","blobs_url":"https://api.github.com/repos/JFreegman/toxcore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JFreegman/toxcore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JFreegman/toxcore/git/refs{/sha}","trees_url":"https://api.github.com/repos/JFreegman/toxcore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JFreegman/toxcore/statuses/{sha}","languages_url":"https://api.github.com/repos/JFreegman/toxcore/languages","stargazers_url":"https://api.github.com/repos/JFreegman/toxcore/stargazers","contributors_url":"https://api.github.com/repos/JFreegman/toxcore/contributors","subscribers_url":"https://api.github.com/repos/JFreegman/toxcore/subscribers","subscription_url":"https://api.github.com/repos/JFreegman/toxcore/subscription","commits_url":"https://api.github.com/repos/JFreegman/toxcore/commits{/sha}","git_commits_url":"https://api.github.com/repos/JFreegman/toxcore/git/commits{/sha}","comments_url":"https://api.github.com/repos/JFreegman/toxcore/comments{/number}","issue_comment_url":"https://api.github.com/repos/JFreegman/toxcore/issues/comments{/number}","contents_url":"https://api.github.com/repos/JFreegman/toxcore/contents/{+path}","compare_url":"https://api.github.com/repos/JFreegman/toxcore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JFreegman/toxcore/merges","archive_url":"https://api.github.com/repos/JFreegman/toxcore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JFreegman/toxcore/downloads","issues_url":"https://api.github.com/repos/JFreegman/toxcore/issues{/number}","pulls_url":"https://api.github.com/repos/JFreegman/toxcore/pulls{/number}","milestones_url":"https://api.github.com/repos/JFreegman/toxcore/milestones{/number}","notifications_url":"https://api.github.com/repos/JFreegman/toxcore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JFreegman/toxcore/labels{/name}","releases_url":"https://api.github.com/repos/JFreegman/toxcore/releases{/id}","created_at":"2014-03-14T00:23:47Z","updated_at":"2015-09-03T22:39:33Z","pushed_at":"2015-09-18T20:26:02Z","git_url":"git://github.com/JFreegman/toxcore.git","ssh_url":"git@github.com:JFreegman/toxcore.git","clone_url":"https://github.com/JFreegman/toxcore.git","svn_url":"https://github.com/JFreegman/toxcore","homepage":"http://tox.chat","size":12754,"stargazers_count":15,"watchers_count":15,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":15,"default_branch":"new_groupchats"}},"_links":{"self":{"href":"https://api.github.com/repos/JFreegman/toxcore/pulls/15"},"html":{"href":"https://github.com/JFreegman/toxcore/pull/15"},"issue":{"href":"https://api.github.com/repos/JFreegman/toxcore/issues/15"},"comments":{"href":"https://api.github.com/repos/JFreegman/toxcore/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/JFreegman/toxcore/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/JFreegman/toxcore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JFreegman/toxcore/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/JFreegman/toxcore/statuses/46d3e0dc7f1c79d98cc92cd4f2b7a7397e086bc7"}}}}