{"action":"created","comment":{"url":"https://api.github.com/repos/acemod/ACE3/pulls/comments/53353302","id":53353302,"diff_hunk":"@@ -30,44 +33,49 @@ void __stdcall RVExtension(char *output, int outputSize, const char *function) {\n     }\r\n \r\n     if (!strcmp(function, \"version\")) {\r\n-        strncpy(output, ACE_FULL_VERSION_STR, outputSize);\r\n+        strncpy_s(output, outputSize, ACE_FULL_VERSION_STR, _TRUNCATE);\r\n         EXTENSION_RETURN();\r\n     }\r\n \r\n-#ifdef _WIN32\r\n-\r\n-    if (!strcmp(function, \"--COMPLETE--\")) {\r\n-        HGLOBAL hClipboardData = GlobalAlloc(GMEM_FIXED, gClipboardData.length() + 1);\r\n-        if (!hClipboardData) {\r\n-            result = \"GlobalAlloc() failed, GetLastError=\" + GetLastError();\r\n-            gClipboardData = \"\";\r\n-            EXTENSION_RETURN();\r\n-        }\r\n-\r\n-        char *pClipboardData = (char *)GlobalLock(hClipboardData);\r\n-        if (!pClipboardData) {\r\n-            result = \"GlobalLock() failed, GetLastError=\" + GetLastError();\r\n-            gClipboardData = \"\";\r\n-            EXTENSION_RETURN();\r\n-        }\r\n-        memcpy(pClipboardData, gClipboardData.c_str(), gClipboardData.length());\r\n-        pClipboardData[gClipboardData.length() + 1] = 0x00;\r\n-\r\n-        GlobalUnlock(hClipboardData);\r\n+    #ifndef _WIN32\r\n+        EXTENSION_RETURN();\r","path":"extensions/clipboard/ace_clipboard.cpp","position":50,"original_position":50,"commit_id":"a1224c5ca6d0b29ee063a00c442563778e35aaa5","original_commit_id":"a1224c5ca6d0b29ee063a00c442563778e35aaa5","user":{"login":"esteldunedain","id":7674951,"avatar_url":"https://avatars.githubusercontent.com/u/7674951?v=3","gravatar_id":"","url":"https://api.github.com/users/esteldunedain","html_url":"https://github.com/esteldunedain","followers_url":"https://api.github.com/users/esteldunedain/followers","following_url":"https://api.github.com/users/esteldunedain/following{/other_user}","gists_url":"https://api.github.com/users/esteldunedain/gists{/gist_id}","starred_url":"https://api.github.com/users/esteldunedain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esteldunedain/subscriptions","organizations_url":"https://api.github.com/users/esteldunedain/orgs","repos_url":"https://api.github.com/users/esteldunedain/repos","events_url":"https://api.github.com/users/esteldunedain/events{/privacy}","received_events_url":"https://api.github.com/users/esteldunedain/received_events","type":"User","site_admin":false},"body":"Yeah, sorry, I missed the `n`","created_at":"2016-02-18T17:57:36Z","updated_at":"2016-02-18T17:57:36Z","html_url":"https://github.com/acemod/ACE3/pull/3331#discussion_r53353302","pull_request_url":"https://api.github.com/repos/acemod/ACE3/pulls/3331","_links":{"self":{"href":"https://api.github.com/repos/acemod/ACE3/pulls/comments/53353302"},"html":{"href":"https://github.com/acemod/ACE3/pull/3331#discussion_r53353302"},"pull_request":{"href":"https://api.github.com/repos/acemod/ACE3/pulls/3331"}}},"pull_request":{"url":"https://api.github.com/repos/acemod/ACE3/pulls/3331","id":59712843,"html_url":"https://github.com/acemod/ACE3/pull/3331","diff_url":"https://github.com/acemod/ACE3/pull/3331.diff","patch_url":"https://github.com/acemod/ACE3/pull/3331.patch","issue_url":"https://api.github.com/repos/acemod/ACE3/issues/3331","number":3331,"state":"open","locked":false,"title":"Fixed c4996 compiler warning/error due to use of strncpy","user":{"login":"looterz","id":1891673,"avatar_url":"https://avatars.githubusercontent.com/u/1891673?v=3","gravatar_id":"","url":"https://api.github.com/users/looterz","html_url":"https://github.com/looterz","followers_url":"https://api.github.com/users/looterz/followers","following_url":"https://api.github.com/users/looterz/following{/other_user}","gists_url":"https://api.github.com/users/looterz/gists{/gist_id}","starred_url":"https://api.github.com/users/looterz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/looterz/subscriptions","organizations_url":"https://api.github.com/users/looterz/orgs","repos_url":"https://api.github.com/users/looterz/repos","events_url":"https://api.github.com/users/looterz/events{/privacy}","received_events_url":"https://api.github.com/users/looterz/received_events","type":"User","site_admin":false},"body":"Noticed the funny comment and thought I would submit a PR, strncpy_s with the _TRUNCATE flag will also ensure that the string is null-terminated whether it fits or not. Looks like ballistics and some other extensions make heavy use of strncpy as well but don't disable the warning, which on some compilers might cause an error.","created_at":"2016-02-17T21:37:43Z","updated_at":"2016-02-18T17:57:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"112031dbec8e7bdecb9a5cb2a1232722f8380c1f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/acemod/ACE3/pulls/3331/commits","review_comments_url":"https://api.github.com/repos/acemod/ACE3/pulls/3331/comments","review_comment_url":"https://api.github.com/repos/acemod/ACE3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/acemod/ACE3/issues/3331/comments","statuses_url":"https://api.github.com/repos/acemod/ACE3/statuses/a1224c5ca6d0b29ee063a00c442563778e35aaa5","head":{"label":"looterz:c4996","ref":"c4996","sha":"a1224c5ca6d0b29ee063a00c442563778e35aaa5","user":{"login":"looterz","id":1891673,"avatar_url":"https://avatars.githubusercontent.com/u/1891673?v=3","gravatar_id":"","url":"https://api.github.com/users/looterz","html_url":"https://github.com/looterz","followers_url":"https://api.github.com/users/looterz/followers","following_url":"https://api.github.com/users/looterz/following{/other_user}","gists_url":"https://api.github.com/users/looterz/gists{/gist_id}","starred_url":"https://api.github.com/users/looterz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/looterz/subscriptions","organizations_url":"https://api.github.com/users/looterz/orgs","repos_url":"https://api.github.com/users/looterz/repos","events_url":"https://api.github.com/users/looterz/events{/privacy}","received_events_url":"https://api.github.com/users/looterz/received_events","type":"User","site_admin":false},"repo":{"id":51935854,"name":"ACE3","full_name":"looterz/ACE3","owner":{"login":"looterz","id":1891673,"avatar_url":"https://avatars.githubusercontent.com/u/1891673?v=3","gravatar_id":"","url":"https://api.github.com/users/looterz","html_url":"https://github.com/looterz","followers_url":"https://api.github.com/users/looterz/followers","following_url":"https://api.github.com/users/looterz/following{/other_user}","gists_url":"https://api.github.com/users/looterz/gists{/gist_id}","starred_url":"https://api.github.com/users/looterz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/looterz/subscriptions","organizations_url":"https://api.github.com/users/looterz/orgs","repos_url":"https://api.github.com/users/looterz/repos","events_url":"https://api.github.com/users/looterz/events{/privacy}","received_events_url":"https://api.github.com/users/looterz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/looterz/ACE3","description":"Open-source realism mod for Arma 3","fork":true,"url":"https://api.github.com/repos/looterz/ACE3","forks_url":"https://api.github.com/repos/looterz/ACE3/forks","keys_url":"https://api.github.com/repos/looterz/ACE3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/looterz/ACE3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/looterz/ACE3/teams","hooks_url":"https://api.github.com/repos/looterz/ACE3/hooks","issue_events_url":"https://api.github.com/repos/looterz/ACE3/issues/events{/number}","events_url":"https://api.github.com/repos/looterz/ACE3/events","assignees_url":"https://api.github.com/repos/looterz/ACE3/assignees{/user}","branches_url":"https://api.github.com/repos/looterz/ACE3/branches{/branch}","tags_url":"https://api.github.com/repos/looterz/ACE3/tags","blobs_url":"https://api.github.com/repos/looterz/ACE3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/looterz/ACE3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/looterz/ACE3/git/refs{/sha}","trees_url":"https://api.github.com/repos/looterz/ACE3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/looterz/ACE3/statuses/{sha}","languages_url":"https://api.github.com/repos/looterz/ACE3/languages","stargazers_url":"https://api.github.com/repos/looterz/ACE3/stargazers","contributors_url":"https://api.github.com/repos/looterz/ACE3/contributors","subscribers_url":"https://api.github.com/repos/looterz/ACE3/subscribers","subscription_url":"https://api.github.com/repos/looterz/ACE3/subscription","commits_url":"https://api.github.com/repos/looterz/ACE3/commits{/sha}","git_commits_url":"https://api.github.com/repos/looterz/ACE3/git/commits{/sha}","comments_url":"https://api.github.com/repos/looterz/ACE3/comments{/number}","issue_comment_url":"https://api.github.com/repos/looterz/ACE3/issues/comments{/number}","contents_url":"https://api.github.com/repos/looterz/ACE3/contents/{+path}","compare_url":"https://api.github.com/repos/looterz/ACE3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/looterz/ACE3/merges","archive_url":"https://api.github.com/repos/looterz/ACE3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/looterz/ACE3/downloads","issues_url":"https://api.github.com/repos/looterz/ACE3/issues{/number}","pulls_url":"https://api.github.com/repos/looterz/ACE3/pulls{/number}","milestones_url":"https://api.github.com/repos/looterz/ACE3/milestones{/number}","notifications_url":"https://api.github.com/repos/looterz/ACE3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/looterz/ACE3/labels{/name}","releases_url":"https://api.github.com/repos/looterz/ACE3/releases{/id}","deployments_url":"https://api.github.com/repos/looterz/ACE3/deployments","created_at":"2016-02-17T16:12:38Z","updated_at":"2016-02-17T16:27:52Z","pushed_at":"2016-02-18T17:54:53Z","git_url":"git://github.com/looterz/ACE3.git","ssh_url":"git@github.com:looterz/ACE3.git","clone_url":"https://github.com/looterz/ACE3.git","svn_url":"https://github.com/looterz/ACE3","homepage":"http://ace3mod.com/","size":274304,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"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":"acemod:master","ref":"master","sha":"c456e1a631346433df276ef5e8b8ae797079d33a","user":{"login":"acemod","id":11369030,"avatar_url":"https://avatars.githubusercontent.com/u/11369030?v=3","gravatar_id":"","url":"https://api.github.com/users/acemod","html_url":"https://github.com/acemod","followers_url":"https://api.github.com/users/acemod/followers","following_url":"https://api.github.com/users/acemod/following{/other_user}","gists_url":"https://api.github.com/users/acemod/gists{/gist_id}","starred_url":"https://api.github.com/users/acemod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acemod/subscriptions","organizations_url":"https://api.github.com/users/acemod/orgs","repos_url":"https://api.github.com/users/acemod/repos","events_url":"https://api.github.com/users/acemod/events{/privacy}","received_events_url":"https://api.github.com/users/acemod/received_events","type":"Organization","site_admin":false},"repo":{"id":29069174,"name":"ACE3","full_name":"acemod/ACE3","owner":{"login":"acemod","id":11369030,"avatar_url":"https://avatars.githubusercontent.com/u/11369030?v=3","gravatar_id":"","url":"https://api.github.com/users/acemod","html_url":"https://github.com/acemod","followers_url":"https://api.github.com/users/acemod/followers","following_url":"https://api.github.com/users/acemod/following{/other_user}","gists_url":"https://api.github.com/users/acemod/gists{/gist_id}","starred_url":"https://api.github.com/users/acemod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acemod/subscriptions","organizations_url":"https://api.github.com/users/acemod/orgs","repos_url":"https://api.github.com/users/acemod/repos","events_url":"https://api.github.com/users/acemod/events{/privacy}","received_events_url":"https://api.github.com/users/acemod/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/acemod/ACE3","description":"Open-source realism mod for Arma 3","fork":false,"url":"https://api.github.com/repos/acemod/ACE3","forks_url":"https://api.github.com/repos/acemod/ACE3/forks","keys_url":"https://api.github.com/repos/acemod/ACE3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/acemod/ACE3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/acemod/ACE3/teams","hooks_url":"https://api.github.com/repos/acemod/ACE3/hooks","issue_events_url":"https://api.github.com/repos/acemod/ACE3/issues/events{/number}","events_url":"https://api.github.com/repos/acemod/ACE3/events","assignees_url":"https://api.github.com/repos/acemod/ACE3/assignees{/user}","branches_url":"https://api.github.com/repos/acemod/ACE3/branches{/branch}","tags_url":"https://api.github.com/repos/acemod/ACE3/tags","blobs_url":"https://api.github.com/repos/acemod/ACE3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/acemod/ACE3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/acemod/ACE3/git/refs{/sha}","trees_url":"https://api.github.com/repos/acemod/ACE3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/acemod/ACE3/statuses/{sha}","languages_url":"https://api.github.com/repos/acemod/ACE3/languages","stargazers_url":"https://api.github.com/repos/acemod/ACE3/stargazers","contributors_url":"https://api.github.com/repos/acemod/ACE3/contributors","subscribers_url":"https://api.github.com/repos/acemod/ACE3/subscribers","subscription_url":"https://api.github.com/repos/acemod/ACE3/subscription","commits_url":"https://api.github.com/repos/acemod/ACE3/commits{/sha}","git_commits_url":"https://api.github.com/repos/acemod/ACE3/git/commits{/sha}","comments_url":"https://api.github.com/repos/acemod/ACE3/comments{/number}","issue_comment_url":"https://api.github.com/repos/acemod/ACE3/issues/comments{/number}","contents_url":"https://api.github.com/repos/acemod/ACE3/contents/{+path}","compare_url":"https://api.github.com/repos/acemod/ACE3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/acemod/ACE3/merges","archive_url":"https://api.github.com/repos/acemod/ACE3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/acemod/ACE3/downloads","issues_url":"https://api.github.com/repos/acemod/ACE3/issues{/number}","pulls_url":"https://api.github.com/repos/acemod/ACE3/pulls{/number}","milestones_url":"https://api.github.com/repos/acemod/ACE3/milestones{/number}","notifications_url":"https://api.github.com/repos/acemod/ACE3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/acemod/ACE3/labels{/name}","releases_url":"https://api.github.com/repos/acemod/ACE3/releases{/id}","deployments_url":"https://api.github.com/repos/acemod/ACE3/deployments","created_at":"2015-01-10T19:59:12Z","updated_at":"2016-02-17T21:43:22Z","pushed_at":"2016-02-18T17:54:53Z","git_url":"git://github.com/acemod/ACE3.git","ssh_url":"git@github.com:acemod/ACE3.git","clone_url":"https://github.com/acemod/ACE3.git","svn_url":"https://github.com/acemod/ACE3","homepage":"http://ace3mod.com/","size":406647,"stargazers_count":353,"watchers_count":353,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":291,"mirror_url":null,"open_issues_count":286,"forks":291,"open_issues":286,"watchers":353,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/acemod/ACE3/pulls/3331"},"html":{"href":"https://github.com/acemod/ACE3/pull/3331"},"issue":{"href":"https://api.github.com/repos/acemod/ACE3/issues/3331"},"comments":{"href":"https://api.github.com/repos/acemod/ACE3/issues/3331/comments"},"review_comments":{"href":"https://api.github.com/repos/acemod/ACE3/pulls/3331/comments"},"review_comment":{"href":"https://api.github.com/repos/acemod/ACE3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/acemod/ACE3/pulls/3331/commits"},"statuses":{"href":"https://api.github.com/repos/acemod/ACE3/statuses/a1224c5ca6d0b29ee063a00c442563778e35aaa5"}}}}