{"action":"created","comment":{"url":"https://api.github.com/repos/rwcarlsen/goexif/pulls/comments/189340855","pull_request_review_id":121506691,"id":189340855,"diff_hunk":"@@ -161,8 +168,15 @@ func testSingle(t *testing.T, order binary.ByteOrder, in input, out output, i in\n \tif tg.Count != out.count {\n \t\tt.Errorf(\"(%v) tag %v component count decode: expected %v, got %v\", order, i, out.count, tg.Count)\n \t}\n-\tif !bytes.Equal(tg.Val, out.val) {\n-\t\tt.Errorf(\"(%v) tag %v value decode: expected %v, got %v\", order, i, out.val, tg.Val)\n+\tif tg.Type == DTAscii && in.val != \"\" {\n+\t\tstrOut := string(out.val)\n+\t\tif tg.strVal != strOut {\n+\t\t\tt.Errorf(\"(%v) tag %v string value decode: expected %v, got %v\", order, i, strOut, tg.strVal)","path":"tiff/tiff_test.go","position":23,"original_position":23,"commit_id":"18704b1d737be8a07768a123388e8445e486f9f4","original_commit_id":"18704b1d737be8a07768a123388e8445e486f9f4","user":{"login":"bradfitz","id":2621,"avatar_url":"https://avatars1.githubusercontent.com/u/2621?v=4","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false},"body":"use %q for failing strings. if it's failing, it's likely gibberish somehow: binary, null bytes, trailing/leading whitespace, etc.\r\n","created_at":"2018-05-18T17:32:52Z","updated_at":"2018-05-18T17:33:36Z","html_url":"https://github.com/rwcarlsen/goexif/pull/58#discussion_r189340855","pull_request_url":"https://api.github.com/repos/rwcarlsen/goexif/pulls/58","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/rwcarlsen/goexif/pulls/comments/189340855"},"html":{"href":"https://github.com/rwcarlsen/goexif/pull/58#discussion_r189340855"},"pull_request":{"href":"https://api.github.com/repos/rwcarlsen/goexif/pulls/58"}}},"pull_request":{"url":"https://api.github.com/repos/rwcarlsen/goexif/pulls/58","id":189087825,"html_url":"https://github.com/rwcarlsen/goexif/pull/58","diff_url":"https://github.com/rwcarlsen/goexif/pull/58.diff","patch_url":"https://github.com/rwcarlsen/goexif/pull/58.patch","issue_url":"https://api.github.com/repos/rwcarlsen/goexif/issues/58","number":58,"state":"open","locked":false,"title":"tiff: ignore all trailing NULLs in case of misleading Count","user":{"login":"mpl","id":626071,"avatar_url":"https://avatars1.githubusercontent.com/u/626071?v=4","gravatar_id":"","url":"https://api.github.com/users/mpl","html_url":"https://github.com/mpl","followers_url":"https://api.github.com/users/mpl/followers","following_url":"https://api.github.com/users/mpl/following{/other_user}","gists_url":"https://api.github.com/users/mpl/gists{/gist_id}","starred_url":"https://api.github.com/users/mpl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpl/subscriptions","organizations_url":"https://api.github.com/users/mpl/orgs","repos_url":"https://api.github.com/users/mpl/repos","events_url":"https://api.github.com/users/mpl/events{/privacy}","received_events_url":"https://api.github.com/users/mpl/received_events","type":"User","site_admin":false},"body":"As it can apparently happen with some camera software\r\n(https://user-images.githubusercontent.com/2621/39392188-71a66fc4-4a66-11e8-9e3b-694163efa643.jpg),\r\nsometimes a tag bytes will not only have a bunch of trailing NULLs, but\r\nthe Count for the data in that tag will be wrongly set too. i.e. instead\r\nof being set to the actual number of relevant bytes to read, it will\r\nbe set to the full number of bytes, trailing zeroes included.\r\n\r\nAs a consequence, the Tag.strVal returned would include these trailing\r\nNULLs too, which would lead to bugs such as\r\nhttps://github.com/perkeep/perkeep/issues/1127\r\n\r\nThis change therefore makes sure to remove all trailing NULLs from the\r\ndata, in the case of DTAscii at least.","created_at":"2018-05-18T17:23:59Z","updated_at":"2018-05-18T17:33:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"21042a213ca78466d071917f50bc0d08d90c892b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rwcarlsen/goexif/pulls/58/commits","review_comments_url":"https://api.github.com/repos/rwcarlsen/goexif/pulls/58/comments","review_comment_url":"https://api.github.com/repos/rwcarlsen/goexif/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rwcarlsen/goexif/issues/58/comments","statuses_url":"https://api.github.com/repos/rwcarlsen/goexif/statuses/18704b1d737be8a07768a123388e8445e486f9f4","head":{"label":"mpl:go1","ref":"go1","sha":"18704b1d737be8a07768a123388e8445e486f9f4","user":{"login":"mpl","id":626071,"avatar_url":"https://avatars1.githubusercontent.com/u/626071?v=4","gravatar_id":"","url":"https://api.github.com/users/mpl","html_url":"https://github.com/mpl","followers_url":"https://api.github.com/users/mpl/followers","following_url":"https://api.github.com/users/mpl/following{/other_user}","gists_url":"https://api.github.com/users/mpl/gists{/gist_id}","starred_url":"https://api.github.com/users/mpl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpl/subscriptions","organizations_url":"https://api.github.com/users/mpl/orgs","repos_url":"https://api.github.com/users/mpl/repos","events_url":"https://api.github.com/users/mpl/events{/privacy}","received_events_url":"https://api.github.com/users/mpl/received_events","type":"User","site_admin":false},"repo":{"id":24391781,"name":"goexif","full_name":"mpl/goexif","owner":{"login":"mpl","id":626071,"avatar_url":"https://avatars1.githubusercontent.com/u/626071?v=4","gravatar_id":"","url":"https://api.github.com/users/mpl","html_url":"https://github.com/mpl","followers_url":"https://api.github.com/users/mpl/followers","following_url":"https://api.github.com/users/mpl/following{/other_user}","gists_url":"https://api.github.com/users/mpl/gists{/gist_id}","starred_url":"https://api.github.com/users/mpl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpl/subscriptions","organizations_url":"https://api.github.com/users/mpl/orgs","repos_url":"https://api.github.com/users/mpl/repos","events_url":"https://api.github.com/users/mpl/events{/privacy}","received_events_url":"https://api.github.com/users/mpl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mpl/goexif","description":"Decode embedded EXIF meta data from image files.","fork":true,"url":"https://api.github.com/repos/mpl/goexif","forks_url":"https://api.github.com/repos/mpl/goexif/forks","keys_url":"https://api.github.com/repos/mpl/goexif/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mpl/goexif/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mpl/goexif/teams","hooks_url":"https://api.github.com/repos/mpl/goexif/hooks","issue_events_url":"https://api.github.com/repos/mpl/goexif/issues/events{/number}","events_url":"https://api.github.com/repos/mpl/goexif/events","assignees_url":"https://api.github.com/repos/mpl/goexif/assignees{/user}","branches_url":"https://api.github.com/repos/mpl/goexif/branches{/branch}","tags_url":"https://api.github.com/repos/mpl/goexif/tags","blobs_url":"https://api.github.com/repos/mpl/goexif/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mpl/goexif/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mpl/goexif/git/refs{/sha}","trees_url":"https://api.github.com/repos/mpl/goexif/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mpl/goexif/statuses/{sha}","languages_url":"https://api.github.com/repos/mpl/goexif/languages","stargazers_url":"https://api.github.com/repos/mpl/goexif/stargazers","contributors_url":"https://api.github.com/repos/mpl/goexif/contributors","subscribers_url":"https://api.github.com/repos/mpl/goexif/subscribers","subscription_url":"https://api.github.com/repos/mpl/goexif/subscription","commits_url":"https://api.github.com/repos/mpl/goexif/commits{/sha}","git_commits_url":"https://api.github.com/repos/mpl/goexif/git/commits{/sha}","comments_url":"https://api.github.com/repos/mpl/goexif/comments{/number}","issue_comment_url":"https://api.github.com/repos/mpl/goexif/issues/comments{/number}","contents_url":"https://api.github.com/repos/mpl/goexif/contents/{+path}","compare_url":"https://api.github.com/repos/mpl/goexif/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mpl/goexif/merges","archive_url":"https://api.github.com/repos/mpl/goexif/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mpl/goexif/downloads","issues_url":"https://api.github.com/repos/mpl/goexif/issues{/number}","pulls_url":"https://api.github.com/repos/mpl/goexif/pulls{/number}","milestones_url":"https://api.github.com/repos/mpl/goexif/milestones{/number}","notifications_url":"https://api.github.com/repos/mpl/goexif/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mpl/goexif/labels{/name}","releases_url":"https://api.github.com/repos/mpl/goexif/releases{/id}","deployments_url":"https://api.github.com/repos/mpl/goexif/deployments","created_at":"2014-09-23T22:30:54Z","updated_at":"2018-05-18T17:23:02Z","pushed_at":"2018-05-18T17:23:00Z","git_url":"git://github.com/mpl/goexif.git","ssh_url":"git@github.com:mpl/goexif.git","clone_url":"https://github.com/mpl/goexif.git","svn_url":"https://github.com/mpl/goexif","homepage":"","size":1145,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"go1"}},"base":{"label":"rwcarlsen:go1","ref":"go1","sha":"fb35d3c3290d09f3524b684b5d42d0063c227158","user":{"login":"rwcarlsen","id":1351242,"avatar_url":"https://avatars2.githubusercontent.com/u/1351242?v=4","gravatar_id":"","url":"https://api.github.com/users/rwcarlsen","html_url":"https://github.com/rwcarlsen","followers_url":"https://api.github.com/users/rwcarlsen/followers","following_url":"https://api.github.com/users/rwcarlsen/following{/other_user}","gists_url":"https://api.github.com/users/rwcarlsen/gists{/gist_id}","starred_url":"https://api.github.com/users/rwcarlsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwcarlsen/subscriptions","organizations_url":"https://api.github.com/users/rwcarlsen/orgs","repos_url":"https://api.github.com/users/rwcarlsen/repos","events_url":"https://api.github.com/users/rwcarlsen/events{/privacy}","received_events_url":"https://api.github.com/users/rwcarlsen/received_events","type":"User","site_admin":false},"repo":{"id":5690244,"name":"goexif","full_name":"rwcarlsen/goexif","owner":{"login":"rwcarlsen","id":1351242,"avatar_url":"https://avatars2.githubusercontent.com/u/1351242?v=4","gravatar_id":"","url":"https://api.github.com/users/rwcarlsen","html_url":"https://github.com/rwcarlsen","followers_url":"https://api.github.com/users/rwcarlsen/followers","following_url":"https://api.github.com/users/rwcarlsen/following{/other_user}","gists_url":"https://api.github.com/users/rwcarlsen/gists{/gist_id}","starred_url":"https://api.github.com/users/rwcarlsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwcarlsen/subscriptions","organizations_url":"https://api.github.com/users/rwcarlsen/orgs","repos_url":"https://api.github.com/users/rwcarlsen/repos","events_url":"https://api.github.com/users/rwcarlsen/events{/privacy}","received_events_url":"https://api.github.com/users/rwcarlsen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rwcarlsen/goexif","description":"Decode embedded EXIF meta data from image files.","fork":false,"url":"https://api.github.com/repos/rwcarlsen/goexif","forks_url":"https://api.github.com/repos/rwcarlsen/goexif/forks","keys_url":"https://api.github.com/repos/rwcarlsen/goexif/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rwcarlsen/goexif/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rwcarlsen/goexif/teams","hooks_url":"https://api.github.com/repos/rwcarlsen/goexif/hooks","issue_events_url":"https://api.github.com/repos/rwcarlsen/goexif/issues/events{/number}","events_url":"https://api.github.com/repos/rwcarlsen/goexif/events","assignees_url":"https://api.github.com/repos/rwcarlsen/goexif/assignees{/user}","branches_url":"https://api.github.com/repos/rwcarlsen/goexif/branches{/branch}","tags_url":"https://api.github.com/repos/rwcarlsen/goexif/tags","blobs_url":"https://api.github.com/repos/rwcarlsen/goexif/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rwcarlsen/goexif/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rwcarlsen/goexif/git/refs{/sha}","trees_url":"https://api.github.com/repos/rwcarlsen/goexif/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rwcarlsen/goexif/statuses/{sha}","languages_url":"https://api.github.com/repos/rwcarlsen/goexif/languages","stargazers_url":"https://api.github.com/repos/rwcarlsen/goexif/stargazers","contributors_url":"https://api.github.com/repos/rwcarlsen/goexif/contributors","subscribers_url":"https://api.github.com/repos/rwcarlsen/goexif/subscribers","subscription_url":"https://api.github.com/repos/rwcarlsen/goexif/subscription","commits_url":"https://api.github.com/repos/rwcarlsen/goexif/commits{/sha}","git_commits_url":"https://api.github.com/repos/rwcarlsen/goexif/git/commits{/sha}","comments_url":"https://api.github.com/repos/rwcarlsen/goexif/comments{/number}","issue_comment_url":"https://api.github.com/repos/rwcarlsen/goexif/issues/comments{/number}","contents_url":"https://api.github.com/repos/rwcarlsen/goexif/contents/{+path}","compare_url":"https://api.github.com/repos/rwcarlsen/goexif/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rwcarlsen/goexif/merges","archive_url":"https://api.github.com/repos/rwcarlsen/goexif/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rwcarlsen/goexif/downloads","issues_url":"https://api.github.com/repos/rwcarlsen/goexif/issues{/number}","pulls_url":"https://api.github.com/repos/rwcarlsen/goexif/pulls{/number}","milestones_url":"https://api.github.com/repos/rwcarlsen/goexif/milestones{/number}","notifications_url":"https://api.github.com/repos/rwcarlsen/goexif/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rwcarlsen/goexif/labels{/name}","releases_url":"https://api.github.com/repos/rwcarlsen/goexif/releases{/id}","deployments_url":"https://api.github.com/repos/rwcarlsen/goexif/deployments","created_at":"2012-09-05T16:49:50Z","updated_at":"2018-05-17T17:13:11Z","pushed_at":"2018-05-18T17:24:00Z","git_url":"git://github.com/rwcarlsen/goexif.git","ssh_url":"git@github.com:rwcarlsen/goexif.git","clone_url":"https://github.com/rwcarlsen/goexif.git","svn_url":"https://github.com/rwcarlsen/goexif","homepage":"","size":1087,"stargazers_count":281,"watchers_count":281,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":65,"mirror_url":null,"archived":false,"open_issues_count":21,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause"},"forks":65,"open_issues":21,"watchers":281,"default_branch":"go1"}},"_links":{"self":{"href":"https://api.github.com/repos/rwcarlsen/goexif/pulls/58"},"html":{"href":"https://github.com/rwcarlsen/goexif/pull/58"},"issue":{"href":"https://api.github.com/repos/rwcarlsen/goexif/issues/58"},"comments":{"href":"https://api.github.com/repos/rwcarlsen/goexif/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/rwcarlsen/goexif/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/rwcarlsen/goexif/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rwcarlsen/goexif/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/rwcarlsen/goexif/statuses/18704b1d737be8a07768a123388e8445e486f9f4"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"bradfitz"}}