{"action":"opened","number":88,"pull_request":{"url":"https://api.github.com/repos/kstenerud/KSCrash/pulls/88","id":33820559,"html_url":"https://github.com/kstenerud/KSCrash/pull/88","diff_url":"https://github.com/kstenerud/KSCrash/pull/88.diff","patch_url":"https://github.com/kstenerud/KSCrash/pull/88.patch","issue_url":"https://api.github.com/repos/kstenerud/KSCrash/issues/88","number":88,"state":"open","locked":false,"title":"Fix buffer over-read in json_decode","user":{"login":"ConradIrwin","id":94272,"avatar_url":"https://avatars.githubusercontent.com/u/94272?v=3","gravatar_id":"","url":"https://api.github.com/users/ConradIrwin","html_url":"https://github.com/ConradIrwin","followers_url":"https://api.github.com/users/ConradIrwin/followers","following_url":"https://api.github.com/users/ConradIrwin/following{/other_user}","gists_url":"https://api.github.com/users/ConradIrwin/gists{/gist_id}","starred_url":"https://api.github.com/users/ConradIrwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ConradIrwin/subscriptions","organizations_url":"https://api.github.com/users/ConradIrwin/orgs","repos_url":"https://api.github.com/users/ConradIrwin/repos","events_url":"https://api.github.com/users/ConradIrwin/events{/privacy}","received_events_url":"https://api.github.com/users/ConradIrwin/received_events","type":"User","site_admin":false},"body":"json_i_decodeElement uses sscanf() to parse floats. Unfortunately\r\nsscanf() expects to be passed a NULL-terminated string, and so calls\r\nstrlen()internally. This causes a buffer-overread in the case that the\r\nbuffer is not NULL-terminated (e.g. when it's from [NSData\r\ndataWithContentsOfFile:])\r\n\r\nThe fix is simple, we just copy floats into a temporary buffer before\r\nparsing them.\r\n\r\nI also considered using strtod(), which doesn't exhibit this bug, but apparently it's undefined behaviour to call that on a non-NULL-terminated buffer too :/.","created_at":"2015-04-22T02:13:13Z","updated_at":"2015-04-22T02:13:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kstenerud/KSCrash/pulls/88/commits","review_comments_url":"https://api.github.com/repos/kstenerud/KSCrash/pulls/88/comments","review_comment_url":"https://api.github.com/repos/kstenerud/KSCrash/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kstenerud/KSCrash/issues/88/comments","statuses_url":"https://api.github.com/repos/kstenerud/KSCrash/statuses/bfa9116542a83220b6bcb58a54e459a4fa9a8b5c","head":{"label":"ConradIrwin:fix-buffer-overread","ref":"fix-buffer-overread","sha":"bfa9116542a83220b6bcb58a54e459a4fa9a8b5c","user":{"login":"ConradIrwin","id":94272,"avatar_url":"https://avatars.githubusercontent.com/u/94272?v=3","gravatar_id":"","url":"https://api.github.com/users/ConradIrwin","html_url":"https://github.com/ConradIrwin","followers_url":"https://api.github.com/users/ConradIrwin/followers","following_url":"https://api.github.com/users/ConradIrwin/following{/other_user}","gists_url":"https://api.github.com/users/ConradIrwin/gists{/gist_id}","starred_url":"https://api.github.com/users/ConradIrwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ConradIrwin/subscriptions","organizations_url":"https://api.github.com/users/ConradIrwin/orgs","repos_url":"https://api.github.com/users/ConradIrwin/repos","events_url":"https://api.github.com/users/ConradIrwin/events{/privacy}","received_events_url":"https://api.github.com/users/ConradIrwin/received_events","type":"User","site_admin":false},"repo":{"id":25653271,"name":"KSCrash","full_name":"ConradIrwin/KSCrash","owner":{"login":"ConradIrwin","id":94272,"avatar_url":"https://avatars.githubusercontent.com/u/94272?v=3","gravatar_id":"","url":"https://api.github.com/users/ConradIrwin","html_url":"https://github.com/ConradIrwin","followers_url":"https://api.github.com/users/ConradIrwin/followers","following_url":"https://api.github.com/users/ConradIrwin/following{/other_user}","gists_url":"https://api.github.com/users/ConradIrwin/gists{/gist_id}","starred_url":"https://api.github.com/users/ConradIrwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ConradIrwin/subscriptions","organizations_url":"https://api.github.com/users/ConradIrwin/orgs","repos_url":"https://api.github.com/users/ConradIrwin/repos","events_url":"https://api.github.com/users/ConradIrwin/events{/privacy}","received_events_url":"https://api.github.com/users/ConradIrwin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ConradIrwin/KSCrash","description":"The Ultimate iOS Crash Reporter","fork":true,"url":"https://api.github.com/repos/ConradIrwin/KSCrash","forks_url":"https://api.github.com/repos/ConradIrwin/KSCrash/forks","keys_url":"https://api.github.com/repos/ConradIrwin/KSCrash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ConradIrwin/KSCrash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ConradIrwin/KSCrash/teams","hooks_url":"https://api.github.com/repos/ConradIrwin/KSCrash/hooks","issue_events_url":"https://api.github.com/repos/ConradIrwin/KSCrash/issues/events{/number}","events_url":"https://api.github.com/repos/ConradIrwin/KSCrash/events","assignees_url":"https://api.github.com/repos/ConradIrwin/KSCrash/assignees{/user}","branches_url":"https://api.github.com/repos/ConradIrwin/KSCrash/branches{/branch}","tags_url":"https://api.github.com/repos/ConradIrwin/KSCrash/tags","blobs_url":"https://api.github.com/repos/ConradIrwin/KSCrash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ConradIrwin/KSCrash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ConradIrwin/KSCrash/git/refs{/sha}","trees_url":"https://api.github.com/repos/ConradIrwin/KSCrash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ConradIrwin/KSCrash/statuses/{sha}","languages_url":"https://api.github.com/repos/ConradIrwin/KSCrash/languages","stargazers_url":"https://api.github.com/repos/ConradIrwin/KSCrash/stargazers","contributors_url":"https://api.github.com/repos/ConradIrwin/KSCrash/contributors","subscribers_url":"https://api.github.com/repos/ConradIrwin/KSCrash/subscribers","subscription_url":"https://api.github.com/repos/ConradIrwin/KSCrash/subscription","commits_url":"https://api.github.com/repos/ConradIrwin/KSCrash/commits{/sha}","git_commits_url":"https://api.github.com/repos/ConradIrwin/KSCrash/git/commits{/sha}","comments_url":"https://api.github.com/repos/ConradIrwin/KSCrash/comments{/number}","issue_comment_url":"https://api.github.com/repos/ConradIrwin/KSCrash/issues/comments{/number}","contents_url":"https://api.github.com/repos/ConradIrwin/KSCrash/contents/{+path}","compare_url":"https://api.github.com/repos/ConradIrwin/KSCrash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ConradIrwin/KSCrash/merges","archive_url":"https://api.github.com/repos/ConradIrwin/KSCrash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ConradIrwin/KSCrash/downloads","issues_url":"https://api.github.com/repos/ConradIrwin/KSCrash/issues{/number}","pulls_url":"https://api.github.com/repos/ConradIrwin/KSCrash/pulls{/number}","milestones_url":"https://api.github.com/repos/ConradIrwin/KSCrash/milestones{/number}","notifications_url":"https://api.github.com/repos/ConradIrwin/KSCrash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ConradIrwin/KSCrash/labels{/name}","releases_url":"https://api.github.com/repos/ConradIrwin/KSCrash/releases{/id}","created_at":"2014-10-23T19:04:23Z","updated_at":"2014-11-15T00:14:20Z","pushed_at":"2015-04-22T02:11:50Z","git_url":"git://github.com/ConradIrwin/KSCrash.git","ssh_url":"git@github.com:ConradIrwin/KSCrash.git","clone_url":"https://github.com/ConradIrwin/KSCrash.git","svn_url":"https://github.com/ConradIrwin/KSCrash","homepage":null,"size":1859,"stargazers_count":0,"watchers_count":0,"language":"Objective-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":"kstenerud:master","ref":"master","sha":"429e692e4eeb2ffd5c716ac8fcbf60e6ed4dbeee","user":{"login":"kstenerud","id":245857,"avatar_url":"https://avatars.githubusercontent.com/u/245857?v=3","gravatar_id":"","url":"https://api.github.com/users/kstenerud","html_url":"https://github.com/kstenerud","followers_url":"https://api.github.com/users/kstenerud/followers","following_url":"https://api.github.com/users/kstenerud/following{/other_user}","gists_url":"https://api.github.com/users/kstenerud/gists{/gist_id}","starred_url":"https://api.github.com/users/kstenerud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kstenerud/subscriptions","organizations_url":"https://api.github.com/users/kstenerud/orgs","repos_url":"https://api.github.com/users/kstenerud/repos","events_url":"https://api.github.com/users/kstenerud/events{/privacy}","received_events_url":"https://api.github.com/users/kstenerud/received_events","type":"User","site_admin":false},"repo":{"id":4691393,"name":"KSCrash","full_name":"kstenerud/KSCrash","owner":{"login":"kstenerud","id":245857,"avatar_url":"https://avatars.githubusercontent.com/u/245857?v=3","gravatar_id":"","url":"https://api.github.com/users/kstenerud","html_url":"https://github.com/kstenerud","followers_url":"https://api.github.com/users/kstenerud/followers","following_url":"https://api.github.com/users/kstenerud/following{/other_user}","gists_url":"https://api.github.com/users/kstenerud/gists{/gist_id}","starred_url":"https://api.github.com/users/kstenerud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kstenerud/subscriptions","organizations_url":"https://api.github.com/users/kstenerud/orgs","repos_url":"https://api.github.com/users/kstenerud/repos","events_url":"https://api.github.com/users/kstenerud/events{/privacy}","received_events_url":"https://api.github.com/users/kstenerud/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kstenerud/KSCrash","description":"The Ultimate iOS Crash Reporter","fork":false,"url":"https://api.github.com/repos/kstenerud/KSCrash","forks_url":"https://api.github.com/repos/kstenerud/KSCrash/forks","keys_url":"https://api.github.com/repos/kstenerud/KSCrash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kstenerud/KSCrash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kstenerud/KSCrash/teams","hooks_url":"https://api.github.com/repos/kstenerud/KSCrash/hooks","issue_events_url":"https://api.github.com/repos/kstenerud/KSCrash/issues/events{/number}","events_url":"https://api.github.com/repos/kstenerud/KSCrash/events","assignees_url":"https://api.github.com/repos/kstenerud/KSCrash/assignees{/user}","branches_url":"https://api.github.com/repos/kstenerud/KSCrash/branches{/branch}","tags_url":"https://api.github.com/repos/kstenerud/KSCrash/tags","blobs_url":"https://api.github.com/repos/kstenerud/KSCrash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kstenerud/KSCrash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kstenerud/KSCrash/git/refs{/sha}","trees_url":"https://api.github.com/repos/kstenerud/KSCrash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kstenerud/KSCrash/statuses/{sha}","languages_url":"https://api.github.com/repos/kstenerud/KSCrash/languages","stargazers_url":"https://api.github.com/repos/kstenerud/KSCrash/stargazers","contributors_url":"https://api.github.com/repos/kstenerud/KSCrash/contributors","subscribers_url":"https://api.github.com/repos/kstenerud/KSCrash/subscribers","subscription_url":"https://api.github.com/repos/kstenerud/KSCrash/subscription","commits_url":"https://api.github.com/repos/kstenerud/KSCrash/commits{/sha}","git_commits_url":"https://api.github.com/repos/kstenerud/KSCrash/git/commits{/sha}","comments_url":"https://api.github.com/repos/kstenerud/KSCrash/comments{/number}","issue_comment_url":"https://api.github.com/repos/kstenerud/KSCrash/issues/comments{/number}","contents_url":"https://api.github.com/repos/kstenerud/KSCrash/contents/{+path}","compare_url":"https://api.github.com/repos/kstenerud/KSCrash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kstenerud/KSCrash/merges","archive_url":"https://api.github.com/repos/kstenerud/KSCrash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kstenerud/KSCrash/downloads","issues_url":"https://api.github.com/repos/kstenerud/KSCrash/issues{/number}","pulls_url":"https://api.github.com/repos/kstenerud/KSCrash/pulls{/number}","milestones_url":"https://api.github.com/repos/kstenerud/KSCrash/milestones{/number}","notifications_url":"https://api.github.com/repos/kstenerud/KSCrash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kstenerud/KSCrash/labels{/name}","releases_url":"https://api.github.com/repos/kstenerud/KSCrash/releases{/id}","created_at":"2012-06-17T11:41:48Z","updated_at":"2015-04-16T09:44:30Z","pushed_at":"2015-04-21T23:55:51Z","git_url":"git://github.com/kstenerud/KSCrash.git","ssh_url":"git@github.com:kstenerud/KSCrash.git","clone_url":"https://github.com/kstenerud/KSCrash.git","svn_url":"https://github.com/kstenerud/KSCrash","homepage":null,"size":2384,"stargazers_count":637,"watchers_count":637,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":91,"mirror_url":null,"open_issues_count":29,"forks":91,"open_issues":29,"watchers":637,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kstenerud/KSCrash/pulls/88"},"html":{"href":"https://github.com/kstenerud/KSCrash/pull/88"},"issue":{"href":"https://api.github.com/repos/kstenerud/KSCrash/issues/88"},"comments":{"href":"https://api.github.com/repos/kstenerud/KSCrash/issues/88/comments"},"review_comments":{"href":"https://api.github.com/repos/kstenerud/KSCrash/pulls/88/comments"},"review_comment":{"href":"https://api.github.com/repos/kstenerud/KSCrash/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kstenerud/KSCrash/pulls/88/commits"},"statuses":{"href":"https://api.github.com/repos/kstenerud/KSCrash/statuses/bfa9116542a83220b6bcb58a54e459a4fa9a8b5c"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":34,"deletions":1,"changed_files":2}}