{"action":"created","comment":{"url":"https://api.github.com/repos/google/gopacket/pulls/comments/54904449","id":54904449,"diff_hunk":"@@ -101,6 +101,9 @@ func (r *Reader) ReadPacketData() (data []byte, ci gopacket.CaptureInfo, err err\n \t}\n \n \tvar n int\n+\tif 16+ci.CaptureLength > len(r.buf) {\n+\t\treturn","path":"pcapgo/read.go","position":5,"original_position":5,"commit_id":"de6adb1b235031b80f5b9beed6a2a5271f186036","original_commit_id":"de6adb1b235031b80f5b9beed6a2a5271f186036","user":{"login":"gconnell","id":1211830,"avatar_url":"https://avatars.githubusercontent.com/u/1211830?v=3","gravatar_id":"","url":"https://api.github.com/users/gconnell","html_url":"https://github.com/gconnell","followers_url":"https://api.github.com/users/gconnell/followers","following_url":"https://api.github.com/users/gconnell/following{/other_user}","gists_url":"https://api.github.com/users/gconnell/gists{/gist_id}","starred_url":"https://api.github.com/users/gconnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gconnell/subscriptions","organizations_url":"https://api.github.com/users/gconnell/orgs","repos_url":"https://api.github.com/users/gconnell/repos","events_url":"https://api.github.com/users/gconnell/events{/privacy}","received_events_url":"https://api.github.com/users/gconnell/received_events","type":"User","site_admin":false},"body":"Should return an error.  Note that if this happens, it's a malformed packet file, since the file said the snaplen was X and is now offering up a packet that's X+N.  Maybe have the error say that.","created_at":"2016-03-03T16:25:03Z","updated_at":"2016-03-03T16:25:03Z","html_url":"https://github.com/google/gopacket/pull/177#discussion_r54904449","pull_request_url":"https://api.github.com/repos/google/gopacket/pulls/177","_links":{"self":{"href":"https://api.github.com/repos/google/gopacket/pulls/comments/54904449"},"html":{"href":"https://github.com/google/gopacket/pull/177#discussion_r54904449"},"pull_request":{"href":"https://api.github.com/repos/google/gopacket/pulls/177"}}},"pull_request":{"url":"https://api.github.com/repos/google/gopacket/pulls/177","id":61568030,"html_url":"https://github.com/google/gopacket/pull/177","diff_url":"https://github.com/google/gopacket/pull/177.diff","patch_url":"https://github.com/google/gopacket/pull/177.patch","issue_url":"https://api.github.com/repos/google/gopacket/issues/177","number":177,"state":"open","locked":false,"title":"Add bounds checking for pcapgo read","user":{"login":"david415","id":50611,"avatar_url":"https://avatars.githubusercontent.com/u/50611?v=3","gravatar_id":"","url":"https://api.github.com/users/david415","html_url":"https://github.com/david415","followers_url":"https://api.github.com/users/david415/followers","following_url":"https://api.github.com/users/david415/following{/other_user}","gists_url":"https://api.github.com/users/david415/gists{/gist_id}","starred_url":"https://api.github.com/users/david415/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david415/subscriptions","organizations_url":"https://api.github.com/users/david415/orgs","repos_url":"https://api.github.com/users/david415/repos","events_url":"https://api.github.com/users/david415/events{/privacy}","received_events_url":"https://api.github.com/users/david415/received_events","type":"User","site_admin":false},"body":"\r\nmake sure slice end is within buffer size","created_at":"2016-03-03T14:40:00Z","updated_at":"2016-03-03T16:25:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c41220cd332199c0507067786de3f1d717b79c2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/google/gopacket/pulls/177/commits","review_comments_url":"https://api.github.com/repos/google/gopacket/pulls/177/comments","review_comment_url":"https://api.github.com/repos/google/gopacket/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/gopacket/issues/177/comments","statuses_url":"https://api.github.com/repos/google/gopacket/statuses/de6adb1b235031b80f5b9beed6a2a5271f186036","head":{"label":"david415:171.add_pcapgo_bounds_checking.0","ref":"171.add_pcapgo_bounds_checking.0","sha":"de6adb1b235031b80f5b9beed6a2a5271f186036","user":{"login":"david415","id":50611,"avatar_url":"https://avatars.githubusercontent.com/u/50611?v=3","gravatar_id":"","url":"https://api.github.com/users/david415","html_url":"https://github.com/david415","followers_url":"https://api.github.com/users/david415/followers","following_url":"https://api.github.com/users/david415/following{/other_user}","gists_url":"https://api.github.com/users/david415/gists{/gist_id}","starred_url":"https://api.github.com/users/david415/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david415/subscriptions","organizations_url":"https://api.github.com/users/david415/orgs","repos_url":"https://api.github.com/users/david415/repos","events_url":"https://api.github.com/users/david415/events{/privacy}","received_events_url":"https://api.github.com/users/david415/received_events","type":"User","site_admin":false},"repo":{"id":37559505,"name":"gopacket","full_name":"david415/gopacket","owner":{"login":"david415","id":50611,"avatar_url":"https://avatars.githubusercontent.com/u/50611?v=3","gravatar_id":"","url":"https://api.github.com/users/david415","html_url":"https://github.com/david415","followers_url":"https://api.github.com/users/david415/followers","following_url":"https://api.github.com/users/david415/following{/other_user}","gists_url":"https://api.github.com/users/david415/gists{/gist_id}","starred_url":"https://api.github.com/users/david415/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david415/subscriptions","organizations_url":"https://api.github.com/users/david415/orgs","repos_url":"https://api.github.com/users/david415/repos","events_url":"https://api.github.com/users/david415/events{/privacy}","received_events_url":"https://api.github.com/users/david415/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/david415/gopacket","description":"Provides packet processing capabilities for Go","fork":true,"url":"https://api.github.com/repos/david415/gopacket","forks_url":"https://api.github.com/repos/david415/gopacket/forks","keys_url":"https://api.github.com/repos/david415/gopacket/keys{/key_id}","collaborators_url":"https://api.github.com/repos/david415/gopacket/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/david415/gopacket/teams","hooks_url":"https://api.github.com/repos/david415/gopacket/hooks","issue_events_url":"https://api.github.com/repos/david415/gopacket/issues/events{/number}","events_url":"https://api.github.com/repos/david415/gopacket/events","assignees_url":"https://api.github.com/repos/david415/gopacket/assignees{/user}","branches_url":"https://api.github.com/repos/david415/gopacket/branches{/branch}","tags_url":"https://api.github.com/repos/david415/gopacket/tags","blobs_url":"https://api.github.com/repos/david415/gopacket/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/david415/gopacket/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/david415/gopacket/git/refs{/sha}","trees_url":"https://api.github.com/repos/david415/gopacket/git/trees{/sha}","statuses_url":"https://api.github.com/repos/david415/gopacket/statuses/{sha}","languages_url":"https://api.github.com/repos/david415/gopacket/languages","stargazers_url":"https://api.github.com/repos/david415/gopacket/stargazers","contributors_url":"https://api.github.com/repos/david415/gopacket/contributors","subscribers_url":"https://api.github.com/repos/david415/gopacket/subscribers","subscription_url":"https://api.github.com/repos/david415/gopacket/subscription","commits_url":"https://api.github.com/repos/david415/gopacket/commits{/sha}","git_commits_url":"https://api.github.com/repos/david415/gopacket/git/commits{/sha}","comments_url":"https://api.github.com/repos/david415/gopacket/comments{/number}","issue_comment_url":"https://api.github.com/repos/david415/gopacket/issues/comments{/number}","contents_url":"https://api.github.com/repos/david415/gopacket/contents/{+path}","compare_url":"https://api.github.com/repos/david415/gopacket/compare/{base}...{head}","merges_url":"https://api.github.com/repos/david415/gopacket/merges","archive_url":"https://api.github.com/repos/david415/gopacket/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/david415/gopacket/downloads","issues_url":"https://api.github.com/repos/david415/gopacket/issues{/number}","pulls_url":"https://api.github.com/repos/david415/gopacket/pulls{/number}","milestones_url":"https://api.github.com/repos/david415/gopacket/milestones{/number}","notifications_url":"https://api.github.com/repos/david415/gopacket/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/david415/gopacket/labels{/name}","releases_url":"https://api.github.com/repos/david415/gopacket/releases{/id}","deployments_url":"https://api.github.com/repos/david415/gopacket/deployments","created_at":"2015-06-16T22:32:30Z","updated_at":"2015-06-16T22:32:31Z","pushed_at":"2016-03-03T15:11:24Z","git_url":"git://github.com/david415/gopacket.git","ssh_url":"git@github.com:david415/gopacket.git","clone_url":"https://github.com/david415/gopacket.git","svn_url":"https://github.com/david415/gopacket","homepage":"","size":3639,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":false,"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":"google:master","ref":"master","sha":"445746376b56687f9e29ab50654597a51ff1a489","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":32351944,"name":"gopacket","full_name":"google/gopacket","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/gopacket","description":"Provides packet processing capabilities for Go","fork":false,"url":"https://api.github.com/repos/google/gopacket","forks_url":"https://api.github.com/repos/google/gopacket/forks","keys_url":"https://api.github.com/repos/google/gopacket/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/gopacket/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/gopacket/teams","hooks_url":"https://api.github.com/repos/google/gopacket/hooks","issue_events_url":"https://api.github.com/repos/google/gopacket/issues/events{/number}","events_url":"https://api.github.com/repos/google/gopacket/events","assignees_url":"https://api.github.com/repos/google/gopacket/assignees{/user}","branches_url":"https://api.github.com/repos/google/gopacket/branches{/branch}","tags_url":"https://api.github.com/repos/google/gopacket/tags","blobs_url":"https://api.github.com/repos/google/gopacket/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/gopacket/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/gopacket/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/gopacket/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/gopacket/statuses/{sha}","languages_url":"https://api.github.com/repos/google/gopacket/languages","stargazers_url":"https://api.github.com/repos/google/gopacket/stargazers","contributors_url":"https://api.github.com/repos/google/gopacket/contributors","subscribers_url":"https://api.github.com/repos/google/gopacket/subscribers","subscription_url":"https://api.github.com/repos/google/gopacket/subscription","commits_url":"https://api.github.com/repos/google/gopacket/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/gopacket/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/gopacket/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/gopacket/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/gopacket/contents/{+path}","compare_url":"https://api.github.com/repos/google/gopacket/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/gopacket/merges","archive_url":"https://api.github.com/repos/google/gopacket/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/gopacket/downloads","issues_url":"https://api.github.com/repos/google/gopacket/issues{/number}","pulls_url":"https://api.github.com/repos/google/gopacket/pulls{/number}","milestones_url":"https://api.github.com/repos/google/gopacket/milestones{/number}","notifications_url":"https://api.github.com/repos/google/gopacket/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/gopacket/labels{/name}","releases_url":"https://api.github.com/repos/google/gopacket/releases{/id}","deployments_url":"https://api.github.com/repos/google/gopacket/deployments","created_at":"2015-03-16T20:46:00Z","updated_at":"2016-03-03T09:10:21Z","pushed_at":"2016-03-03T15:11:53Z","git_url":"git://github.com/google/gopacket.git","ssh_url":"git@github.com:google/gopacket.git","clone_url":"https://github.com/google/gopacket.git","svn_url":"https://github.com/google/gopacket","homepage":"","size":4148,"stargazers_count":506,"watchers_count":506,"language":"Go","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":91,"mirror_url":null,"open_issues_count":41,"forks":91,"open_issues":41,"watchers":506,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/gopacket/pulls/177"},"html":{"href":"https://github.com/google/gopacket/pull/177"},"issue":{"href":"https://api.github.com/repos/google/gopacket/issues/177"},"comments":{"href":"https://api.github.com/repos/google/gopacket/issues/177/comments"},"review_comments":{"href":"https://api.github.com/repos/google/gopacket/pulls/177/comments"},"review_comment":{"href":"https://api.github.com/repos/google/gopacket/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/gopacket/pulls/177/commits"},"statuses":{"href":"https://api.github.com/repos/google/gopacket/statuses/de6adb1b235031b80f5b9beed6a2a5271f186036"}}}}