{"action":"created","comment":{"url":"https://api.github.com/repos/nvaccess/nvda/pulls/comments/230720476","pull_request_review_id":171517560,"id":230720476,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMDcyMDQ3Ng==","diff_hunk":"@@ -912,19 +912,18 @@ int VBufStorage_buffer_t::getTextLength() const {\n \treturn length;\r\n }\r\n \r\n-wstring  VBufStorage_buffer_t::getTextInRange(int startOffset, int endOffset, bool useMarkup) {\r\n+bool VBufStorage_buffer_t::getTextInRange(int startOffset, int endOffset, wstring& text, bool useMarkup) {\r\n \tif(this->rootNode==NULL) {\r\n \t\tLOG_DEBUGWARNING(L\"buffer is empty, returning NULL\");\r\n-\t\treturn NULL;\r","path":"nvdaHelper/vbufBase/storage.cpp","position":8,"original_position":8,"commit_id":"db71b5fe15efd2246fe5e52b873bf7ac15473237","original_commit_id":"db71b5fe15efd2246fe5e52b873bf7ac15473237","user":{"login":"feerrenrut","id":3491346,"node_id":"MDQ6VXNlcjM0OTEzNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/3491346?v=4","gravatar_id":"","url":"https://api.github.com/users/feerrenrut","html_url":"https://github.com/feerrenrut","followers_url":"https://api.github.com/users/feerrenrut/followers","following_url":"https://api.github.com/users/feerrenrut/following{/other_user}","gists_url":"https://api.github.com/users/feerrenrut/gists{/gist_id}","starred_url":"https://api.github.com/users/feerrenrut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feerrenrut/subscriptions","organizations_url":"https://api.github.com/users/feerrenrut/orgs","repos_url":"https://api.github.com/users/feerrenrut/repos","events_url":"https://api.github.com/users/feerrenrut/events{/privacy}","received_events_url":"https://api.github.com/users/feerrenrut/received_events","type":"User","site_admin":false},"body":"Alternatively this could just return empty strings in this case.","created_at":"2018-11-05T11:40:50Z","updated_at":"2018-11-05T11:40:50Z","html_url":"https://github.com/nvaccess/nvda/pull/8907#discussion_r230720476","pull_request_url":"https://api.github.com/repos/nvaccess/nvda/pulls/8907","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/nvaccess/nvda/pulls/comments/230720476"},"html":{"href":"https://github.com/nvaccess/nvda/pull/8907#discussion_r230720476"},"pull_request":{"href":"https://api.github.com/repos/nvaccess/nvda/pulls/8907"}}},"pull_request":{"url":"https://api.github.com/repos/nvaccess/nvda/pulls/8907","id":227785845,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3Nzg1ODQ1","html_url":"https://github.com/nvaccess/nvda/pull/8907","diff_url":"https://github.com/nvaccess/nvda/pull/8907.diff","patch_url":"https://github.com/nvaccess/nvda/pull/8907.patch","issue_url":"https://api.github.com/repos/nvaccess/nvda/issues/8907","number":8907,"state":"closed","locked":false,"title":"Fix crash in VBufStorage_buffer_t::getTextInRange when at the end of a buffer","user":{"login":"michaelDCurran","id":14154141,"node_id":"MDQ6VXNlcjE0MTU0MTQx","avatar_url":"https://avatars0.githubusercontent.com/u/14154141?v=4","gravatar_id":"","url":"https://api.github.com/users/michaelDCurran","html_url":"https://github.com/michaelDCurran","followers_url":"https://api.github.com/users/michaelDCurran/followers","following_url":"https://api.github.com/users/michaelDCurran/following{/other_user}","gists_url":"https://api.github.com/users/michaelDCurran/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelDCurran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelDCurran/subscriptions","organizations_url":"https://api.github.com/users/michaelDCurran/orgs","repos_url":"https://api.github.com/users/michaelDCurran/repos","events_url":"https://api.github.com/users/michaelDCurran/events{/privacy}","received_events_url":"https://api.github.com/users/michaelDCurran/received_events","type":"User","site_admin":false},"body":"<!--\r\nPlease fill in the following template, for an explanation of the sections see:\r\nhttps://github.com/nvaccess/nvda/wiki/Github-pull-request-template-explanation-and-examples\r\n-->\r\n\r\n### Link to issue number:\r\nNone.\r\n\r\n### Summary of the issue:\r\nPR #8866 (merging of VBufBackends into nvdaHelperRemote) introduced a crash in VBufStorage_buffer_t::getTextInRange.\r\nTo reproduce:\r\n* Open Firefox\r\n* Go to  URL: ``` data:text/html,<p></p> ```\r\n* When focused in the document in browse mode, press right arrow and Firefox will crash.\r\nThis is because VBufStorage_buffer_t::getTextInRange is declaired as returning a wstring, but on some errors it returns NULL. I am very surprised the compiler allows this.\r\n\r\n### Description of how this pull request fixes the issue:\r\nThis PR changes getTextInRange so that it takes a string by reference which it copies the text into, and it returns a bool communicating success or failure. Note that this is the way that the node-specific getTextInRange methods work already.\r\n\r\n### Testing performed:\r\nIn Firefox:\r\n* Arrowed up and down a standard html page with content.\r\n* Pressed right arrow on a completely blank page. There was no crash.\r\n\r\n### Known issues with pull request:\r\nNone.\r\n\r\n### Change log entry:\r\nNone needed.\r\n","created_at":"2018-11-01T23:03:31Z","updated_at":"2018-11-05T11:40:50Z","closed_at":"2018-11-02T01:21:52Z","merged_at":"2018-11-02T01:21:52Z","merge_commit_sha":"87eb36f859a8562f0dc601306527f5d720eeaeb7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/nvaccess/nvda/milestones/42","html_url":"https://github.com/nvaccess/nvda/milestone/42","labels_url":"https://api.github.com/repos/nvaccess/nvda/milestones/42/labels","id":3567454,"node_id":"MDk6TWlsZXN0b25lMzU2NzQ1NA==","number":42,"title":"2018.4","description":"","creator":{"login":"jcsteh","id":4166475,"node_id":"MDQ6VXNlcjQxNjY0NzU=","avatar_url":"https://avatars1.githubusercontent.com/u/4166475?v=4","gravatar_id":"","url":"https://api.github.com/users/jcsteh","html_url":"https://github.com/jcsteh","followers_url":"https://api.github.com/users/jcsteh/followers","following_url":"https://api.github.com/users/jcsteh/following{/other_user}","gists_url":"https://api.github.com/users/jcsteh/gists{/gist_id}","starred_url":"https://api.github.com/users/jcsteh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcsteh/subscriptions","organizations_url":"https://api.github.com/users/jcsteh/orgs","repos_url":"https://api.github.com/users/jcsteh/repos","events_url":"https://api.github.com/users/jcsteh/events{/privacy}","received_events_url":"https://api.github.com/users/jcsteh/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":74,"state":"open","created_at":"2018-08-14T02:19:19Z","updated_at":"2018-11-02T01:21:54Z","due_on":"2018-11-22T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/nvaccess/nvda/pulls/8907/commits","review_comments_url":"https://api.github.com/repos/nvaccess/nvda/pulls/8907/comments","review_comment_url":"https://api.github.com/repos/nvaccess/nvda/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nvaccess/nvda/issues/8907/comments","statuses_url":"https://api.github.com/repos/nvaccess/nvda/statuses/db71b5fe15efd2246fe5e52b873bf7ac15473237","head":{"label":"nvaccess:fixMergedVBufBackendLibsCrash","ref":"fixMergedVBufBackendLibsCrash","sha":"db71b5fe15efd2246fe5e52b873bf7ac15473237","user":{"login":"nvaccess","id":4166525,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxNjY1MjU=","avatar_url":"https://avatars2.githubusercontent.com/u/4166525?v=4","gravatar_id":"","url":"https://api.github.com/users/nvaccess","html_url":"https://github.com/nvaccess","followers_url":"https://api.github.com/users/nvaccess/followers","following_url":"https://api.github.com/users/nvaccess/following{/other_user}","gists_url":"https://api.github.com/users/nvaccess/gists{/gist_id}","starred_url":"https://api.github.com/users/nvaccess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nvaccess/subscriptions","organizations_url":"https://api.github.com/users/nvaccess/orgs","repos_url":"https://api.github.com/users/nvaccess/repos","events_url":"https://api.github.com/users/nvaccess/events{/privacy}","received_events_url":"https://api.github.com/users/nvaccess/received_events","type":"Organization","site_admin":false},"repo":{"id":45885732,"node_id":"MDEwOlJlcG9zaXRvcnk0NTg4NTczMg==","name":"nvda","full_name":"nvaccess/nvda","private":false,"owner":{"login":"nvaccess","id":4166525,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxNjY1MjU=","avatar_url":"https://avatars2.githubusercontent.com/u/4166525?v=4","gravatar_id":"","url":"https://api.github.com/users/nvaccess","html_url":"https://github.com/nvaccess","followers_url":"https://api.github.com/users/nvaccess/followers","following_url":"https://api.github.com/users/nvaccess/following{/other_user}","gists_url":"https://api.github.com/users/nvaccess/gists{/gist_id}","starred_url":"https://api.github.com/users/nvaccess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nvaccess/subscriptions","organizations_url":"https://api.github.com/users/nvaccess/orgs","repos_url":"https://api.github.com/users/nvaccess/repos","events_url":"https://api.github.com/users/nvaccess/events{/privacy}","received_events_url":"https://api.github.com/users/nvaccess/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/nvaccess/nvda","description":"NVDA, the free and open source Screen Reader for Microsoft Windows","fork":false,"url":"https://api.github.com/repos/nvaccess/nvda","forks_url":"https://api.github.com/repos/nvaccess/nvda/forks","keys_url":"https://api.github.com/repos/nvaccess/nvda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nvaccess/nvda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nvaccess/nvda/teams","hooks_url":"https://api.github.com/repos/nvaccess/nvda/hooks","issue_events_url":"https://api.github.com/repos/nvaccess/nvda/issues/events{/number}","events_url":"https://api.github.com/repos/nvaccess/nvda/events","assignees_url":"https://api.github.com/repos/nvaccess/nvda/assignees{/user}","branches_url":"https://api.github.com/repos/nvaccess/nvda/branches{/branch}","tags_url":"https://api.github.com/repos/nvaccess/nvda/tags","blobs_url":"https://api.github.com/repos/nvaccess/nvda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nvaccess/nvda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nvaccess/nvda/git/refs{/sha}","trees_url":"https://api.github.com/repos/nvaccess/nvda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nvaccess/nvda/statuses/{sha}","languages_url":"https://api.github.com/repos/nvaccess/nvda/languages","stargazers_url":"https://api.github.com/repos/nvaccess/nvda/stargazers","contributors_url":"https://api.github.com/repos/nvaccess/nvda/contributors","subscribers_url":"https://api.github.com/repos/nvaccess/nvda/subscribers","subscription_url":"https://api.github.com/repos/nvaccess/nvda/subscription","commits_url":"https://api.github.com/repos/nvaccess/nvda/commits{/sha}","git_commits_url":"https://api.github.com/repos/nvaccess/nvda/git/commits{/sha}","comments_url":"https://api.github.com/repos/nvaccess/nvda/comments{/number}","issue_comment_url":"https://api.github.com/repos/nvaccess/nvda/issues/comments{/number}","contents_url":"https://api.github.com/repos/nvaccess/nvda/contents/{+path}","compare_url":"https://api.github.com/repos/nvaccess/nvda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nvaccess/nvda/merges","archive_url":"https://api.github.com/repos/nvaccess/nvda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nvaccess/nvda/downloads","issues_url":"https://api.github.com/repos/nvaccess/nvda/issues{/number}","pulls_url":"https://api.github.com/repos/nvaccess/nvda/pulls{/number}","milestones_url":"https://api.github.com/repos/nvaccess/nvda/milestones{/number}","notifications_url":"https://api.github.com/repos/nvaccess/nvda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nvaccess/nvda/labels{/name}","releases_url":"https://api.github.com/repos/nvaccess/nvda/releases{/id}","deployments_url":"https://api.github.com/repos/nvaccess/nvda/deployments","created_at":"2015-11-10T03:47:11Z","updated_at":"2018-11-04T01:21:27Z","pushed_at":"2018-11-05T07:28:24Z","git_url":"git://github.com/nvaccess/nvda.git","ssh_url":"git@github.com:nvaccess/nvda.git","clone_url":"https://github.com/nvaccess/nvda.git","svn_url":"https://github.com/nvaccess/nvda","homepage":null,"size":159674,"stargazers_count":578,"watchers_count":578,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":236,"mirror_url":null,"archived":false,"open_issues_count":2392,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":236,"open_issues":2392,"watchers":578,"default_branch":"master"}},"base":{"label":"nvaccess:master","ref":"master","sha":"8c4557b4fc5b3a90f54219a35d046b7c14604046","user":{"login":"nvaccess","id":4166525,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxNjY1MjU=","avatar_url":"https://avatars2.githubusercontent.com/u/4166525?v=4","gravatar_id":"","url":"https://api.github.com/users/nvaccess","html_url":"https://github.com/nvaccess","followers_url":"https://api.github.com/users/nvaccess/followers","following_url":"https://api.github.com/users/nvaccess/following{/other_user}","gists_url":"https://api.github.com/users/nvaccess/gists{/gist_id}","starred_url":"https://api.github.com/users/nvaccess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nvaccess/subscriptions","organizations_url":"https://api.github.com/users/nvaccess/orgs","repos_url":"https://api.github.com/users/nvaccess/repos","events_url":"https://api.github.com/users/nvaccess/events{/privacy}","received_events_url":"https://api.github.com/users/nvaccess/received_events","type":"Organization","site_admin":false},"repo":{"id":45885732,"node_id":"MDEwOlJlcG9zaXRvcnk0NTg4NTczMg==","name":"nvda","full_name":"nvaccess/nvda","private":false,"owner":{"login":"nvaccess","id":4166525,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxNjY1MjU=","avatar_url":"https://avatars2.githubusercontent.com/u/4166525?v=4","gravatar_id":"","url":"https://api.github.com/users/nvaccess","html_url":"https://github.com/nvaccess","followers_url":"https://api.github.com/users/nvaccess/followers","following_url":"https://api.github.com/users/nvaccess/following{/other_user}","gists_url":"https://api.github.com/users/nvaccess/gists{/gist_id}","starred_url":"https://api.github.com/users/nvaccess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nvaccess/subscriptions","organizations_url":"https://api.github.com/users/nvaccess/orgs","repos_url":"https://api.github.com/users/nvaccess/repos","events_url":"https://api.github.com/users/nvaccess/events{/privacy}","received_events_url":"https://api.github.com/users/nvaccess/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/nvaccess/nvda","description":"NVDA, the free and open source Screen Reader for Microsoft Windows","fork":false,"url":"https://api.github.com/repos/nvaccess/nvda","forks_url":"https://api.github.com/repos/nvaccess/nvda/forks","keys_url":"https://api.github.com/repos/nvaccess/nvda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nvaccess/nvda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nvaccess/nvda/teams","hooks_url":"https://api.github.com/repos/nvaccess/nvda/hooks","issue_events_url":"https://api.github.com/repos/nvaccess/nvda/issues/events{/number}","events_url":"https://api.github.com/repos/nvaccess/nvda/events","assignees_url":"https://api.github.com/repos/nvaccess/nvda/assignees{/user}","branches_url":"https://api.github.com/repos/nvaccess/nvda/branches{/branch}","tags_url":"https://api.github.com/repos/nvaccess/nvda/tags","blobs_url":"https://api.github.com/repos/nvaccess/nvda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nvaccess/nvda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nvaccess/nvda/git/refs{/sha}","trees_url":"https://api.github.com/repos/nvaccess/nvda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nvaccess/nvda/statuses/{sha}","languages_url":"https://api.github.com/repos/nvaccess/nvda/languages","stargazers_url":"https://api.github.com/repos/nvaccess/nvda/stargazers","contributors_url":"https://api.github.com/repos/nvaccess/nvda/contributors","subscribers_url":"https://api.github.com/repos/nvaccess/nvda/subscribers","subscription_url":"https://api.github.com/repos/nvaccess/nvda/subscription","commits_url":"https://api.github.com/repos/nvaccess/nvda/commits{/sha}","git_commits_url":"https://api.github.com/repos/nvaccess/nvda/git/commits{/sha}","comments_url":"https://api.github.com/repos/nvaccess/nvda/comments{/number}","issue_comment_url":"https://api.github.com/repos/nvaccess/nvda/issues/comments{/number}","contents_url":"https://api.github.com/repos/nvaccess/nvda/contents/{+path}","compare_url":"https://api.github.com/repos/nvaccess/nvda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nvaccess/nvda/merges","archive_url":"https://api.github.com/repos/nvaccess/nvda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nvaccess/nvda/downloads","issues_url":"https://api.github.com/repos/nvaccess/nvda/issues{/number}","pulls_url":"https://api.github.com/repos/nvaccess/nvda/pulls{/number}","milestones_url":"https://api.github.com/repos/nvaccess/nvda/milestones{/number}","notifications_url":"https://api.github.com/repos/nvaccess/nvda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nvaccess/nvda/labels{/name}","releases_url":"https://api.github.com/repos/nvaccess/nvda/releases{/id}","deployments_url":"https://api.github.com/repos/nvaccess/nvda/deployments","created_at":"2015-11-10T03:47:11Z","updated_at":"2018-11-04T01:21:27Z","pushed_at":"2018-11-05T07:28:24Z","git_url":"git://github.com/nvaccess/nvda.git","ssh_url":"git@github.com:nvaccess/nvda.git","clone_url":"https://github.com/nvaccess/nvda.git","svn_url":"https://github.com/nvaccess/nvda","homepage":null,"size":159674,"stargazers_count":578,"watchers_count":578,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":236,"mirror_url":null,"archived":false,"open_issues_count":2392,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":236,"open_issues":2392,"watchers":578,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nvaccess/nvda/pulls/8907"},"html":{"href":"https://github.com/nvaccess/nvda/pull/8907"},"issue":{"href":"https://api.github.com/repos/nvaccess/nvda/issues/8907"},"comments":{"href":"https://api.github.com/repos/nvaccess/nvda/issues/8907/comments"},"review_comments":{"href":"https://api.github.com/repos/nvaccess/nvda/pulls/8907/comments"},"review_comment":{"href":"https://api.github.com/repos/nvaccess/nvda/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nvaccess/nvda/pulls/8907/commits"},"statuses":{"href":"https://api.github.com/repos/nvaccess/nvda/statuses/db71b5fe15efd2246fe5e52b873bf7ac15473237"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"feerrenrut"}}