{"action":"opened","number":5,"pull_request":{"url":"https://api.github.com/repos/caltechcs2/concurrency/pulls/5","id":59223692,"html_url":"https://github.com/caltechcs2/concurrency/pull/5","diff_url":"https://github.com/caltechcs2/concurrency/pull/5.diff","patch_url":"https://github.com/caltechcs2/concurrency/pull/5.patch","issue_url":"https://api.github.com/repos/caltechcs2/concurrency/issues/5","number":5,"state":"open","locked":false,"title":"reader.cpp: Fixed strncpy() not copying null terminator","user":{"login":"enricozb","id":5505315,"avatar_url":"https://avatars.githubusercontent.com/u/5505315?v=3","gravatar_id":"","url":"https://api.github.com/users/enricozb","html_url":"https://github.com/enricozb","followers_url":"https://api.github.com/users/enricozb/followers","following_url":"https://api.github.com/users/enricozb/following{/other_user}","gists_url":"https://api.github.com/users/enricozb/gists{/gist_id}","starred_url":"https://api.github.com/users/enricozb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enricozb/subscriptions","organizations_url":"https://api.github.com/users/enricozb/orgs","repos_url":"https://api.github.com/users/enricozb/repos","events_url":"https://api.github.com/users/enricozb/events{/privacy}","received_events_url":"https://api.github.com/users/enricozb/received_events","type":"User","site_admin":false},"body":"I don't know if this is meant to be fixed by the student, but `strncpy()` does **not** copy the null terminator to the destination string. It seems that `strncpy()` pads the destination buffer with `NULL` only if its smaller than the `len` argument that is passed in. I don't think `strncpy()` should be used with null terminated strings, which is what is being done here. It's safer to use `strlcpy()` or to terminate the string on the user's side.","created_at":"2016-02-12T20:04:45Z","updated_at":"2016-02-12T20:04:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/caltechcs2/concurrency/pulls/5/commits","review_comments_url":"https://api.github.com/repos/caltechcs2/concurrency/pulls/5/comments","review_comment_url":"https://api.github.com/repos/caltechcs2/concurrency/pulls/comments{/number}","comments_url":"https://api.github.com/repos/caltechcs2/concurrency/issues/5/comments","statuses_url":"https://api.github.com/repos/caltechcs2/concurrency/statuses/7465d1407f69a4d96cf2fae226cd10079f85a23f","head":{"label":"enricozb:master","ref":"master","sha":"7465d1407f69a4d96cf2fae226cd10079f85a23f","user":{"login":"enricozb","id":5505315,"avatar_url":"https://avatars.githubusercontent.com/u/5505315?v=3","gravatar_id":"","url":"https://api.github.com/users/enricozb","html_url":"https://github.com/enricozb","followers_url":"https://api.github.com/users/enricozb/followers","following_url":"https://api.github.com/users/enricozb/following{/other_user}","gists_url":"https://api.github.com/users/enricozb/gists{/gist_id}","starred_url":"https://api.github.com/users/enricozb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enricozb/subscriptions","organizations_url":"https://api.github.com/users/enricozb/orgs","repos_url":"https://api.github.com/users/enricozb/repos","events_url":"https://api.github.com/users/enricozb/events{/privacy}","received_events_url":"https://api.github.com/users/enricozb/received_events","type":"User","site_admin":false},"repo":{"id":51611833,"name":"concurrency","full_name":"enricozb/concurrency","owner":{"login":"enricozb","id":5505315,"avatar_url":"https://avatars.githubusercontent.com/u/5505315?v=3","gravatar_id":"","url":"https://api.github.com/users/enricozb","html_url":"https://github.com/enricozb","followers_url":"https://api.github.com/users/enricozb/followers","following_url":"https://api.github.com/users/enricozb/following{/other_user}","gists_url":"https://api.github.com/users/enricozb/gists{/gist_id}","starred_url":"https://api.github.com/users/enricozb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enricozb/subscriptions","organizations_url":"https://api.github.com/users/enricozb/orgs","repos_url":"https://api.github.com/users/enricozb/repos","events_url":"https://api.github.com/users/enricozb/events{/privacy}","received_events_url":"https://api.github.com/users/enricozb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/enricozb/concurrency","description":"","fork":true,"url":"https://api.github.com/repos/enricozb/concurrency","forks_url":"https://api.github.com/repos/enricozb/concurrency/forks","keys_url":"https://api.github.com/repos/enricozb/concurrency/keys{/key_id}","collaborators_url":"https://api.github.com/repos/enricozb/concurrency/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/enricozb/concurrency/teams","hooks_url":"https://api.github.com/repos/enricozb/concurrency/hooks","issue_events_url":"https://api.github.com/repos/enricozb/concurrency/issues/events{/number}","events_url":"https://api.github.com/repos/enricozb/concurrency/events","assignees_url":"https://api.github.com/repos/enricozb/concurrency/assignees{/user}","branches_url":"https://api.github.com/repos/enricozb/concurrency/branches{/branch}","tags_url":"https://api.github.com/repos/enricozb/concurrency/tags","blobs_url":"https://api.github.com/repos/enricozb/concurrency/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/enricozb/concurrency/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/enricozb/concurrency/git/refs{/sha}","trees_url":"https://api.github.com/repos/enricozb/concurrency/git/trees{/sha}","statuses_url":"https://api.github.com/repos/enricozb/concurrency/statuses/{sha}","languages_url":"https://api.github.com/repos/enricozb/concurrency/languages","stargazers_url":"https://api.github.com/repos/enricozb/concurrency/stargazers","contributors_url":"https://api.github.com/repos/enricozb/concurrency/contributors","subscribers_url":"https://api.github.com/repos/enricozb/concurrency/subscribers","subscription_url":"https://api.github.com/repos/enricozb/concurrency/subscription","commits_url":"https://api.github.com/repos/enricozb/concurrency/commits{/sha}","git_commits_url":"https://api.github.com/repos/enricozb/concurrency/git/commits{/sha}","comments_url":"https://api.github.com/repos/enricozb/concurrency/comments{/number}","issue_comment_url":"https://api.github.com/repos/enricozb/concurrency/issues/comments{/number}","contents_url":"https://api.github.com/repos/enricozb/concurrency/contents/{+path}","compare_url":"https://api.github.com/repos/enricozb/concurrency/compare/{base}...{head}","merges_url":"https://api.github.com/repos/enricozb/concurrency/merges","archive_url":"https://api.github.com/repos/enricozb/concurrency/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/enricozb/concurrency/downloads","issues_url":"https://api.github.com/repos/enricozb/concurrency/issues{/number}","pulls_url":"https://api.github.com/repos/enricozb/concurrency/pulls{/number}","milestones_url":"https://api.github.com/repos/enricozb/concurrency/milestones{/number}","notifications_url":"https://api.github.com/repos/enricozb/concurrency/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/enricozb/concurrency/labels{/name}","releases_url":"https://api.github.com/repos/enricozb/concurrency/releases{/id}","deployments_url":"https://api.github.com/repos/enricozb/concurrency/deployments","created_at":"2016-02-12T19:42:30Z","updated_at":"2016-02-12T19:42:31Z","pushed_at":"2016-02-12T19:55:58Z","git_url":"git://github.com/enricozb/concurrency.git","ssh_url":"git@github.com:enricozb/concurrency.git","clone_url":"https://github.com/enricozb/concurrency.git","svn_url":"https://github.com/enricozb/concurrency","homepage":null,"size":190,"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":"master"}},"base":{"label":"caltechcs2:master","ref":"master","sha":"90cab396a4617bd4acdcf21ead5fcbe5b5221a8a","user":{"login":"caltechcs2","id":16552011,"avatar_url":"https://avatars.githubusercontent.com/u/16552011?v=3","gravatar_id":"","url":"https://api.github.com/users/caltechcs2","html_url":"https://github.com/caltechcs2","followers_url":"https://api.github.com/users/caltechcs2/followers","following_url":"https://api.github.com/users/caltechcs2/following{/other_user}","gists_url":"https://api.github.com/users/caltechcs2/gists{/gist_id}","starred_url":"https://api.github.com/users/caltechcs2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caltechcs2/subscriptions","organizations_url":"https://api.github.com/users/caltechcs2/orgs","repos_url":"https://api.github.com/users/caltechcs2/repos","events_url":"https://api.github.com/users/caltechcs2/events{/privacy}","received_events_url":"https://api.github.com/users/caltechcs2/received_events","type":"Organization","site_admin":false},"repo":{"id":50763413,"name":"concurrency","full_name":"caltechcs2/concurrency","owner":{"login":"caltechcs2","id":16552011,"avatar_url":"https://avatars.githubusercontent.com/u/16552011?v=3","gravatar_id":"","url":"https://api.github.com/users/caltechcs2","html_url":"https://github.com/caltechcs2","followers_url":"https://api.github.com/users/caltechcs2/followers","following_url":"https://api.github.com/users/caltechcs2/following{/other_user}","gists_url":"https://api.github.com/users/caltechcs2/gists{/gist_id}","starred_url":"https://api.github.com/users/caltechcs2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caltechcs2/subscriptions","organizations_url":"https://api.github.com/users/caltechcs2/orgs","repos_url":"https://api.github.com/users/caltechcs2/repos","events_url":"https://api.github.com/users/caltechcs2/events{/privacy}","received_events_url":"https://api.github.com/users/caltechcs2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/caltechcs2/concurrency","description":"","fork":false,"url":"https://api.github.com/repos/caltechcs2/concurrency","forks_url":"https://api.github.com/repos/caltechcs2/concurrency/forks","keys_url":"https://api.github.com/repos/caltechcs2/concurrency/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caltechcs2/concurrency/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caltechcs2/concurrency/teams","hooks_url":"https://api.github.com/repos/caltechcs2/concurrency/hooks","issue_events_url":"https://api.github.com/repos/caltechcs2/concurrency/issues/events{/number}","events_url":"https://api.github.com/repos/caltechcs2/concurrency/events","assignees_url":"https://api.github.com/repos/caltechcs2/concurrency/assignees{/user}","branches_url":"https://api.github.com/repos/caltechcs2/concurrency/branches{/branch}","tags_url":"https://api.github.com/repos/caltechcs2/concurrency/tags","blobs_url":"https://api.github.com/repos/caltechcs2/concurrency/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caltechcs2/concurrency/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caltechcs2/concurrency/git/refs{/sha}","trees_url":"https://api.github.com/repos/caltechcs2/concurrency/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caltechcs2/concurrency/statuses/{sha}","languages_url":"https://api.github.com/repos/caltechcs2/concurrency/languages","stargazers_url":"https://api.github.com/repos/caltechcs2/concurrency/stargazers","contributors_url":"https://api.github.com/repos/caltechcs2/concurrency/contributors","subscribers_url":"https://api.github.com/repos/caltechcs2/concurrency/subscribers","subscription_url":"https://api.github.com/repos/caltechcs2/concurrency/subscription","commits_url":"https://api.github.com/repos/caltechcs2/concurrency/commits{/sha}","git_commits_url":"https://api.github.com/repos/caltechcs2/concurrency/git/commits{/sha}","comments_url":"https://api.github.com/repos/caltechcs2/concurrency/comments{/number}","issue_comment_url":"https://api.github.com/repos/caltechcs2/concurrency/issues/comments{/number}","contents_url":"https://api.github.com/repos/caltechcs2/concurrency/contents/{+path}","compare_url":"https://api.github.com/repos/caltechcs2/concurrency/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caltechcs2/concurrency/merges","archive_url":"https://api.github.com/repos/caltechcs2/concurrency/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caltechcs2/concurrency/downloads","issues_url":"https://api.github.com/repos/caltechcs2/concurrency/issues{/number}","pulls_url":"https://api.github.com/repos/caltechcs2/concurrency/pulls{/number}","milestones_url":"https://api.github.com/repos/caltechcs2/concurrency/milestones{/number}","notifications_url":"https://api.github.com/repos/caltechcs2/concurrency/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caltechcs2/concurrency/labels{/name}","releases_url":"https://api.github.com/repos/caltechcs2/concurrency/releases{/id}","deployments_url":"https://api.github.com/repos/caltechcs2/concurrency/deployments","created_at":"2016-01-31T07:21:22Z","updated_at":"2016-01-31T07:22:06Z","pushed_at":"2016-02-12T01:47:57Z","git_url":"git://github.com/caltechcs2/concurrency.git","ssh_url":"git@github.com:caltechcs2/concurrency.git","clone_url":"https://github.com/caltechcs2/concurrency.git","svn_url":"https://github.com/caltechcs2/concurrency","homepage":null,"size":190,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"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":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/caltechcs2/concurrency/pulls/5"},"html":{"href":"https://github.com/caltechcs2/concurrency/pull/5"},"issue":{"href":"https://api.github.com/repos/caltechcs2/concurrency/issues/5"},"comments":{"href":"https://api.github.com/repos/caltechcs2/concurrency/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/caltechcs2/concurrency/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/caltechcs2/concurrency/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/caltechcs2/concurrency/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/caltechcs2/concurrency/statuses/7465d1407f69a4d96cf2fae226cd10079f85a23f"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":0,"changed_files":1}}