{"action":"created","comment":{"url":"https://api.github.com/repos/neovim/neovim/pulls/comments/34947352","id":34947352,"diff_hunk":"@@ -5296,9 +5297,11 @@ void ex_helptags(exarg_T *eap)\n   }\n \n   /* Get a list of all files in the help directory and in subdirectories. */\n-  STRCPY(NameBuff, dirname);\n+  if (STRLCPY(NameBuff, dirname, MAXPATHL) >= MAXPATHL)\n+    EMSG(_(e_pathtoolong));","path":"src/nvim/ex_cmds.c","position":14,"original_position":14,"commit_id":"d67b7e53575a976a35d6f9b55ea58de96d536d38","original_commit_id":"d67b7e53575a976a35d6f9b55ea58de96d536d38","user":{"login":"splinterofchaos","id":38515,"avatar_url":"https://avatars.githubusercontent.com/u/38515?v=3","gravatar_id":"","url":"https://api.github.com/users/splinterofchaos","html_url":"https://github.com/splinterofchaos","followers_url":"https://api.github.com/users/splinterofchaos/followers","following_url":"https://api.github.com/users/splinterofchaos/following{/other_user}","gists_url":"https://api.github.com/users/splinterofchaos/gists{/gist_id}","starred_url":"https://api.github.com/users/splinterofchaos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/splinterofchaos/subscriptions","organizations_url":"https://api.github.com/users/splinterofchaos/orgs","repos_url":"https://api.github.com/users/splinterofchaos/repos","events_url":"https://api.github.com/users/splinterofchaos/events{/privacy}","received_events_url":"https://api.github.com/users/splinterofchaos/received_events","type":"User","site_admin":false},"body":"Typically when printing an error, we also return from the function. But here, since we already know `dirname` is a valid directory, we don't need to check for an error.","created_at":"2015-07-18T12:54:10Z","updated_at":"2015-07-18T12:54:10Z","html_url":"https://github.com/neovim/neovim/pull/3042#discussion_r34947352","pull_request_url":"https://api.github.com/repos/neovim/neovim/pulls/3042","_links":{"self":{"href":"https://api.github.com/repos/neovim/neovim/pulls/comments/34947352"},"html":{"href":"https://github.com/neovim/neovim/pull/3042#discussion_r34947352"},"pull_request":{"href":"https://api.github.com/repos/neovim/neovim/pulls/3042"}}},"pull_request":{"url":"https://api.github.com/repos/neovim/neovim/pulls/3042","id":40289834,"html_url":"https://github.com/neovim/neovim/pull/3042","diff_url":"https://github.com/neovim/neovim/pull/3042.diff","patch_url":"https://github.com/neovim/neovim/pull/3042.patch","issue_url":"https://api.github.com/repos/neovim/neovim/issues/3042","number":3042,"state":"open","locked":false,"title":"Continue #1069 and add xstrlcat function","user":{"login":"cztchoice","id":1571034,"avatar_url":"https://avatars.githubusercontent.com/u/1571034?v=3","gravatar_id":"","url":"https://api.github.com/users/cztchoice","html_url":"https://github.com/cztchoice","followers_url":"https://api.github.com/users/cztchoice/followers","following_url":"https://api.github.com/users/cztchoice/following{/other_user}","gists_url":"https://api.github.com/users/cztchoice/gists{/gist_id}","starred_url":"https://api.github.com/users/cztchoice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cztchoice/subscriptions","organizations_url":"https://api.github.com/users/cztchoice/orgs","repos_url":"https://api.github.com/users/cztchoice/repos","events_url":"https://api.github.com/users/cztchoice/events{/privacy}","received_events_url":"https://api.github.com/users/cztchoice/received_events","type":"User","site_admin":false},"body":"Fix coverity issue in #988\r\nby using STRLCPY and add STRLCAT.\r\n\r\ncoverity related/{71530,71531,71532}\r\n\r\nProblems list there:\r\n> If strlen(dirname) >= MAXPATHL then NameBuff would not be NUL terminated. But the next function call could be using strlen on NameBuff. We should better use STRLCPY here. by @oni-link \r\n\r\ndone\r\n\r\n> STRNCAT uses MAXPATHL on the src argument, not on the dst argument. So appending \"**\" could overflow NameBuff, because no size check was made for dst. by @oni-link\r\n\r\nDone by add xstrlcat in memory.c, and check it.\r\n\r\n> check when truncation happens & EMSG(e_pathtoolong) by @splinterofchaos  @philix \r\n\r\ndone. Changes in option.c is not the same as ex_cmds.c haven't been discussed, so I don't check if truncation happens there.\r\n\r\n> rename the commit to ' coverity/{71530,71531,71532}: ...`  by @elmart\r\n\r\nShould I still do it now?","created_at":"2015-07-18T09:38:21Z","updated_at":"2015-07-18T12:54:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"87a1cf993eea06a5df0c830d031bc143df7f5632","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/neovim/neovim/pulls/3042/commits","review_comments_url":"https://api.github.com/repos/neovim/neovim/pulls/3042/comments","review_comment_url":"https://api.github.com/repos/neovim/neovim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/3042/comments","statuses_url":"https://api.github.com/repos/neovim/neovim/statuses/d67b7e53575a976a35d6f9b55ea58de96d536d38","head":{"label":"cztchoice:fix-1069","ref":"fix-1069","sha":"d67b7e53575a976a35d6f9b55ea58de96d536d38","user":{"login":"cztchoice","id":1571034,"avatar_url":"https://avatars.githubusercontent.com/u/1571034?v=3","gravatar_id":"","url":"https://api.github.com/users/cztchoice","html_url":"https://github.com/cztchoice","followers_url":"https://api.github.com/users/cztchoice/followers","following_url":"https://api.github.com/users/cztchoice/following{/other_user}","gists_url":"https://api.github.com/users/cztchoice/gists{/gist_id}","starred_url":"https://api.github.com/users/cztchoice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cztchoice/subscriptions","organizations_url":"https://api.github.com/users/cztchoice/orgs","repos_url":"https://api.github.com/users/cztchoice/repos","events_url":"https://api.github.com/users/cztchoice/events{/privacy}","received_events_url":"https://api.github.com/users/cztchoice/received_events","type":"User","site_admin":false},"repo":{"id":38944465,"name":"neovim","full_name":"cztchoice/neovim","owner":{"login":"cztchoice","id":1571034,"avatar_url":"https://avatars.githubusercontent.com/u/1571034?v=3","gravatar_id":"","url":"https://api.github.com/users/cztchoice","html_url":"https://github.com/cztchoice","followers_url":"https://api.github.com/users/cztchoice/followers","following_url":"https://api.github.com/users/cztchoice/following{/other_user}","gists_url":"https://api.github.com/users/cztchoice/gists{/gist_id}","starred_url":"https://api.github.com/users/cztchoice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cztchoice/subscriptions","organizations_url":"https://api.github.com/users/cztchoice/orgs","repos_url":"https://api.github.com/users/cztchoice/repos","events_url":"https://api.github.com/users/cztchoice/events{/privacy}","received_events_url":"https://api.github.com/users/cztchoice/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cztchoice/neovim","description":"ambitious Vim-fork focused on extensibility and agility. Consider helping sustain Neovim development! ","fork":true,"url":"https://api.github.com/repos/cztchoice/neovim","forks_url":"https://api.github.com/repos/cztchoice/neovim/forks","keys_url":"https://api.github.com/repos/cztchoice/neovim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cztchoice/neovim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cztchoice/neovim/teams","hooks_url":"https://api.github.com/repos/cztchoice/neovim/hooks","issue_events_url":"https://api.github.com/repos/cztchoice/neovim/issues/events{/number}","events_url":"https://api.github.com/repos/cztchoice/neovim/events","assignees_url":"https://api.github.com/repos/cztchoice/neovim/assignees{/user}","branches_url":"https://api.github.com/repos/cztchoice/neovim/branches{/branch}","tags_url":"https://api.github.com/repos/cztchoice/neovim/tags","blobs_url":"https://api.github.com/repos/cztchoice/neovim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cztchoice/neovim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cztchoice/neovim/git/refs{/sha}","trees_url":"https://api.github.com/repos/cztchoice/neovim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cztchoice/neovim/statuses/{sha}","languages_url":"https://api.github.com/repos/cztchoice/neovim/languages","stargazers_url":"https://api.github.com/repos/cztchoice/neovim/stargazers","contributors_url":"https://api.github.com/repos/cztchoice/neovim/contributors","subscribers_url":"https://api.github.com/repos/cztchoice/neovim/subscribers","subscription_url":"https://api.github.com/repos/cztchoice/neovim/subscription","commits_url":"https://api.github.com/repos/cztchoice/neovim/commits{/sha}","git_commits_url":"https://api.github.com/repos/cztchoice/neovim/git/commits{/sha}","comments_url":"https://api.github.com/repos/cztchoice/neovim/comments{/number}","issue_comment_url":"https://api.github.com/repos/cztchoice/neovim/issues/comments{/number}","contents_url":"https://api.github.com/repos/cztchoice/neovim/contents/{+path}","compare_url":"https://api.github.com/repos/cztchoice/neovim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cztchoice/neovim/merges","archive_url":"https://api.github.com/repos/cztchoice/neovim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cztchoice/neovim/downloads","issues_url":"https://api.github.com/repos/cztchoice/neovim/issues{/number}","pulls_url":"https://api.github.com/repos/cztchoice/neovim/pulls{/number}","milestones_url":"https://api.github.com/repos/cztchoice/neovim/milestones{/number}","notifications_url":"https://api.github.com/repos/cztchoice/neovim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cztchoice/neovim/labels{/name}","releases_url":"https://api.github.com/repos/cztchoice/neovim/releases{/id}","created_at":"2015-07-12T00:00:04Z","updated_at":"2015-07-12T00:00:09Z","pushed_at":"2015-07-18T09:29:57Z","git_url":"git://github.com/cztchoice/neovim.git","ssh_url":"git@github.com:cztchoice/neovim.git","clone_url":"https://github.com/cztchoice/neovim.git","svn_url":"https://github.com/cztchoice/neovim","homepage":"https://salt.bountysource.com/teams/neovim","size":31652,"stargazers_count":0,"watchers_count":0,"language":"VimL","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":"neovim:master","ref":"master","sha":"4d79edccdc0243a02a20ef46184b8f87f2bda290","user":{"login":"neovim","id":6471485,"avatar_url":"https://avatars.githubusercontent.com/u/6471485?v=3","gravatar_id":"","url":"https://api.github.com/users/neovim","html_url":"https://github.com/neovim","followers_url":"https://api.github.com/users/neovim/followers","following_url":"https://api.github.com/users/neovim/following{/other_user}","gists_url":"https://api.github.com/users/neovim/gists{/gist_id}","starred_url":"https://api.github.com/users/neovim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neovim/subscriptions","organizations_url":"https://api.github.com/users/neovim/orgs","repos_url":"https://api.github.com/users/neovim/repos","events_url":"https://api.github.com/users/neovim/events{/privacy}","received_events_url":"https://api.github.com/users/neovim/received_events","type":"Organization","site_admin":false},"repo":{"id":16408992,"name":"neovim","full_name":"neovim/neovim","owner":{"login":"neovim","id":6471485,"avatar_url":"https://avatars.githubusercontent.com/u/6471485?v=3","gravatar_id":"","url":"https://api.github.com/users/neovim","html_url":"https://github.com/neovim","followers_url":"https://api.github.com/users/neovim/followers","following_url":"https://api.github.com/users/neovim/following{/other_user}","gists_url":"https://api.github.com/users/neovim/gists{/gist_id}","starred_url":"https://api.github.com/users/neovim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neovim/subscriptions","organizations_url":"https://api.github.com/users/neovim/orgs","repos_url":"https://api.github.com/users/neovim/repos","events_url":"https://api.github.com/users/neovim/events{/privacy}","received_events_url":"https://api.github.com/users/neovim/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/neovim/neovim","description":"ambitious Vim-fork focused on extensibility and agility. Consider helping sustain Neovim development! ","fork":false,"url":"https://api.github.com/repos/neovim/neovim","forks_url":"https://api.github.com/repos/neovim/neovim/forks","keys_url":"https://api.github.com/repos/neovim/neovim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neovim/neovim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neovim/neovim/teams","hooks_url":"https://api.github.com/repos/neovim/neovim/hooks","issue_events_url":"https://api.github.com/repos/neovim/neovim/issues/events{/number}","events_url":"https://api.github.com/repos/neovim/neovim/events","assignees_url":"https://api.github.com/repos/neovim/neovim/assignees{/user}","branches_url":"https://api.github.com/repos/neovim/neovim/branches{/branch}","tags_url":"https://api.github.com/repos/neovim/neovim/tags","blobs_url":"https://api.github.com/repos/neovim/neovim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neovim/neovim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neovim/neovim/git/refs{/sha}","trees_url":"https://api.github.com/repos/neovim/neovim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neovim/neovim/statuses/{sha}","languages_url":"https://api.github.com/repos/neovim/neovim/languages","stargazers_url":"https://api.github.com/repos/neovim/neovim/stargazers","contributors_url":"https://api.github.com/repos/neovim/neovim/contributors","subscribers_url":"https://api.github.com/repos/neovim/neovim/subscribers","subscription_url":"https://api.github.com/repos/neovim/neovim/subscription","commits_url":"https://api.github.com/repos/neovim/neovim/commits{/sha}","git_commits_url":"https://api.github.com/repos/neovim/neovim/git/commits{/sha}","comments_url":"https://api.github.com/repos/neovim/neovim/comments{/number}","issue_comment_url":"https://api.github.com/repos/neovim/neovim/issues/comments{/number}","contents_url":"https://api.github.com/repos/neovim/neovim/contents/{+path}","compare_url":"https://api.github.com/repos/neovim/neovim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neovim/neovim/merges","archive_url":"https://api.github.com/repos/neovim/neovim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neovim/neovim/downloads","issues_url":"https://api.github.com/repos/neovim/neovim/issues{/number}","pulls_url":"https://api.github.com/repos/neovim/neovim/pulls{/number}","milestones_url":"https://api.github.com/repos/neovim/neovim/milestones{/number}","notifications_url":"https://api.github.com/repos/neovim/neovim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neovim/neovim/labels{/name}","releases_url":"https://api.github.com/repos/neovim/neovim/releases{/id}","created_at":"2014-01-31T13:39:22Z","updated_at":"2015-07-18T11:22:32Z","pushed_at":"2015-07-18T12:48:17Z","git_url":"git://github.com/neovim/neovim.git","ssh_url":"git@github.com:neovim/neovim.git","clone_url":"https://github.com/neovim/neovim.git","svn_url":"https://github.com/neovim/neovim","homepage":"https://salt.bountysource.com/teams/neovim","size":78042,"stargazers_count":14218,"watchers_count":14218,"language":"VimL","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":976,"mirror_url":null,"open_issues_count":558,"forks":976,"open_issues":558,"watchers":14218,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/neovim/neovim/pulls/3042"},"html":{"href":"https://github.com/neovim/neovim/pull/3042"},"issue":{"href":"https://api.github.com/repos/neovim/neovim/issues/3042"},"comments":{"href":"https://api.github.com/repos/neovim/neovim/issues/3042/comments"},"review_comments":{"href":"https://api.github.com/repos/neovim/neovim/pulls/3042/comments"},"review_comment":{"href":"https://api.github.com/repos/neovim/neovim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neovim/neovim/pulls/3042/commits"},"statuses":{"href":"https://api.github.com/repos/neovim/neovim/statuses/d67b7e53575a976a35d6f9b55ea58de96d536d38"}}}}