{"action":"closed","number":459,"pull_request":{"url":"https://api.github.com/repos/OpenSC/OpenSC/pulls/459","id":35088672,"html_url":"https://github.com/OpenSC/OpenSC/pull/459","diff_url":"https://github.com/OpenSC/OpenSC/pull/459.diff","patch_url":"https://github.com/OpenSC/OpenSC/pull/459.patch","issue_url":"https://api.github.com/repos/OpenSC/OpenSC/issues/459","number":459,"state":"closed","locked":false,"title":"iso7816.c: allow file length stored in more than 2 bytes","user":{"login":"vletoux","id":10632326,"avatar_url":"https://avatars.githubusercontent.com/u/10632326?v=3","gravatar_id":"","url":"https://api.github.com/users/vletoux","html_url":"https://github.com/vletoux","followers_url":"https://api.github.com/users/vletoux/followers","following_url":"https://api.github.com/users/vletoux/following{/other_user}","gists_url":"https://api.github.com/users/vletoux/gists{/gist_id}","starred_url":"https://api.github.com/users/vletoux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vletoux/subscriptions","organizations_url":"https://api.github.com/users/vletoux/orgs","repos_url":"https://api.github.com/users/vletoux/repos","events_url":"https://api.github.com/users/vletoux/events{/privacy}","received_events_url":"https://api.github.com/users/vletoux/received_events","type":"User","site_admin":false},"body":"As indicated in chapter 7.4.3 of iso 7816-4, file length, encoded in tag 0x80 or 0x81 can be stored in more than 2 bytes.\r\nAs is, the code allows only 2 bytes and check only for the first tag. If there is 2 tags with 4 bytes then 2 bytes, the file size computation fails.\r\nhttps://github.com/OpenSC/OpenSC/blob/master/src/libopensc/iso7816.c#L362-373\r\n\r\n![chapter 7 4 3](https://cloud.githubusercontent.com/assets/10632326/7556203/b5673432-f767-11e4-9a7b-7866ab830483.png)\r\n\r\nThis patch push the limit to 4 bytes and moreover, if one tag has an incorrect value, it tries the next tag.","created_at":"2015-05-10T20:59:32Z","updated_at":"2015-05-13T08:07:01Z","closed_at":"2015-05-13T08:07:01Z","merged_at":null,"merge_commit_sha":"d5753ffcc8398172930f1c8fccec7f2258b3b0d7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OpenSC/OpenSC/pulls/459/commits","review_comments_url":"https://api.github.com/repos/OpenSC/OpenSC/pulls/459/comments","review_comment_url":"https://api.github.com/repos/OpenSC/OpenSC/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenSC/OpenSC/issues/459/comments","statuses_url":"https://api.github.com/repos/OpenSC/OpenSC/statuses/365989b5e6084539f15d252cfafdc89771196b93","head":{"label":"vletoux:iso7816-tag-variable-len","ref":"iso7816-tag-variable-len","sha":"365989b5e6084539f15d252cfafdc89771196b93","user":{"login":"vletoux","id":10632326,"avatar_url":"https://avatars.githubusercontent.com/u/10632326?v=3","gravatar_id":"","url":"https://api.github.com/users/vletoux","html_url":"https://github.com/vletoux","followers_url":"https://api.github.com/users/vletoux/followers","following_url":"https://api.github.com/users/vletoux/following{/other_user}","gists_url":"https://api.github.com/users/vletoux/gists{/gist_id}","starred_url":"https://api.github.com/users/vletoux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vletoux/subscriptions","organizations_url":"https://api.github.com/users/vletoux/orgs","repos_url":"https://api.github.com/users/vletoux/repos","events_url":"https://api.github.com/users/vletoux/events{/privacy}","received_events_url":"https://api.github.com/users/vletoux/received_events","type":"User","site_admin":false},"repo":{"id":35221862,"name":"OpenSC","full_name":"vletoux/OpenSC","owner":{"login":"vletoux","id":10632326,"avatar_url":"https://avatars.githubusercontent.com/u/10632326?v=3","gravatar_id":"","url":"https://api.github.com/users/vletoux","html_url":"https://github.com/vletoux","followers_url":"https://api.github.com/users/vletoux/followers","following_url":"https://api.github.com/users/vletoux/following{/other_user}","gists_url":"https://api.github.com/users/vletoux/gists{/gist_id}","starred_url":"https://api.github.com/users/vletoux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vletoux/subscriptions","organizations_url":"https://api.github.com/users/vletoux/orgs","repos_url":"https://api.github.com/users/vletoux/repos","events_url":"https://api.github.com/users/vletoux/events{/privacy}","received_events_url":"https://api.github.com/users/vletoux/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vletoux/OpenSC","description":"Open source smart card tools and middleware. PKCS#11/MiniDriver/Tokend","fork":true,"url":"https://api.github.com/repos/vletoux/OpenSC","forks_url":"https://api.github.com/repos/vletoux/OpenSC/forks","keys_url":"https://api.github.com/repos/vletoux/OpenSC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vletoux/OpenSC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vletoux/OpenSC/teams","hooks_url":"https://api.github.com/repos/vletoux/OpenSC/hooks","issue_events_url":"https://api.github.com/repos/vletoux/OpenSC/issues/events{/number}","events_url":"https://api.github.com/repos/vletoux/OpenSC/events","assignees_url":"https://api.github.com/repos/vletoux/OpenSC/assignees{/user}","branches_url":"https://api.github.com/repos/vletoux/OpenSC/branches{/branch}","tags_url":"https://api.github.com/repos/vletoux/OpenSC/tags","blobs_url":"https://api.github.com/repos/vletoux/OpenSC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vletoux/OpenSC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vletoux/OpenSC/git/refs{/sha}","trees_url":"https://api.github.com/repos/vletoux/OpenSC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vletoux/OpenSC/statuses/{sha}","languages_url":"https://api.github.com/repos/vletoux/OpenSC/languages","stargazers_url":"https://api.github.com/repos/vletoux/OpenSC/stargazers","contributors_url":"https://api.github.com/repos/vletoux/OpenSC/contributors","subscribers_url":"https://api.github.com/repos/vletoux/OpenSC/subscribers","subscription_url":"https://api.github.com/repos/vletoux/OpenSC/subscription","commits_url":"https://api.github.com/repos/vletoux/OpenSC/commits{/sha}","git_commits_url":"https://api.github.com/repos/vletoux/OpenSC/git/commits{/sha}","comments_url":"https://api.github.com/repos/vletoux/OpenSC/comments{/number}","issue_comment_url":"https://api.github.com/repos/vletoux/OpenSC/issues/comments{/number}","contents_url":"https://api.github.com/repos/vletoux/OpenSC/contents/{+path}","compare_url":"https://api.github.com/repos/vletoux/OpenSC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vletoux/OpenSC/merges","archive_url":"https://api.github.com/repos/vletoux/OpenSC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vletoux/OpenSC/downloads","issues_url":"https://api.github.com/repos/vletoux/OpenSC/issues{/number}","pulls_url":"https://api.github.com/repos/vletoux/OpenSC/pulls{/number}","milestones_url":"https://api.github.com/repos/vletoux/OpenSC/milestones{/number}","notifications_url":"https://api.github.com/repos/vletoux/OpenSC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vletoux/OpenSC/labels{/name}","releases_url":"https://api.github.com/repos/vletoux/OpenSC/releases{/id}","created_at":"2015-05-07T13:33:43Z","updated_at":"2015-05-07T13:33:46Z","pushed_at":"2015-05-13T08:07:01Z","git_url":"git://github.com/vletoux/OpenSC.git","ssh_url":"git@github.com:vletoux/OpenSC.git","clone_url":"https://github.com/vletoux/OpenSC.git","svn_url":"https://github.com/vletoux/OpenSC","homepage":"https://github.com/OpenSC/OpenSC/wiki","size":10021,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"OpenSC:master","ref":"master","sha":"72b5d8fe9adcd5ae3ecb89b4c617151222e44c8b","user":{"login":"OpenSC","id":895249,"avatar_url":"https://avatars.githubusercontent.com/u/895249?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenSC","html_url":"https://github.com/OpenSC","followers_url":"https://api.github.com/users/OpenSC/followers","following_url":"https://api.github.com/users/OpenSC/following{/other_user}","gists_url":"https://api.github.com/users/OpenSC/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenSC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenSC/subscriptions","organizations_url":"https://api.github.com/users/OpenSC/orgs","repos_url":"https://api.github.com/users/OpenSC/repos","events_url":"https://api.github.com/users/OpenSC/events{/privacy}","received_events_url":"https://api.github.com/users/OpenSC/received_events","type":"Organization","site_admin":false},"repo":{"id":1999692,"name":"OpenSC","full_name":"OpenSC/OpenSC","owner":{"login":"OpenSC","id":895249,"avatar_url":"https://avatars.githubusercontent.com/u/895249?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenSC","html_url":"https://github.com/OpenSC","followers_url":"https://api.github.com/users/OpenSC/followers","following_url":"https://api.github.com/users/OpenSC/following{/other_user}","gists_url":"https://api.github.com/users/OpenSC/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenSC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenSC/subscriptions","organizations_url":"https://api.github.com/users/OpenSC/orgs","repos_url":"https://api.github.com/users/OpenSC/repos","events_url":"https://api.github.com/users/OpenSC/events{/privacy}","received_events_url":"https://api.github.com/users/OpenSC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenSC/OpenSC","description":"Open source smart card tools and middleware. PKCS#11/MiniDriver/Tokend","fork":false,"url":"https://api.github.com/repos/OpenSC/OpenSC","forks_url":"https://api.github.com/repos/OpenSC/OpenSC/forks","keys_url":"https://api.github.com/repos/OpenSC/OpenSC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenSC/OpenSC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenSC/OpenSC/teams","hooks_url":"https://api.github.com/repos/OpenSC/OpenSC/hooks","issue_events_url":"https://api.github.com/repos/OpenSC/OpenSC/issues/events{/number}","events_url":"https://api.github.com/repos/OpenSC/OpenSC/events","assignees_url":"https://api.github.com/repos/OpenSC/OpenSC/assignees{/user}","branches_url":"https://api.github.com/repos/OpenSC/OpenSC/branches{/branch}","tags_url":"https://api.github.com/repos/OpenSC/OpenSC/tags","blobs_url":"https://api.github.com/repos/OpenSC/OpenSC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenSC/OpenSC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenSC/OpenSC/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenSC/OpenSC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenSC/OpenSC/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenSC/OpenSC/languages","stargazers_url":"https://api.github.com/repos/OpenSC/OpenSC/stargazers","contributors_url":"https://api.github.com/repos/OpenSC/OpenSC/contributors","subscribers_url":"https://api.github.com/repos/OpenSC/OpenSC/subscribers","subscription_url":"https://api.github.com/repos/OpenSC/OpenSC/subscription","commits_url":"https://api.github.com/repos/OpenSC/OpenSC/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenSC/OpenSC/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenSC/OpenSC/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenSC/OpenSC/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenSC/OpenSC/contents/{+path}","compare_url":"https://api.github.com/repos/OpenSC/OpenSC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenSC/OpenSC/merges","archive_url":"https://api.github.com/repos/OpenSC/OpenSC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenSC/OpenSC/downloads","issues_url":"https://api.github.com/repos/OpenSC/OpenSC/issues{/number}","pulls_url":"https://api.github.com/repos/OpenSC/OpenSC/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenSC/OpenSC/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenSC/OpenSC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenSC/OpenSC/labels{/name}","releases_url":"https://api.github.com/repos/OpenSC/OpenSC/releases{/id}","created_at":"2011-07-05T09:45:08Z","updated_at":"2015-05-11T19:59:26Z","pushed_at":"2015-05-13T08:07:00Z","git_url":"git://github.com/OpenSC/OpenSC.git","ssh_url":"git@github.com:OpenSC/OpenSC.git","clone_url":"https://github.com/OpenSC/OpenSC.git","svn_url":"https://github.com/OpenSC/OpenSC","homepage":"https://github.com/OpenSC/OpenSC/wiki","size":42147,"stargazers_count":260,"watchers_count":260,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":174,"mirror_url":null,"open_issues_count":35,"forks":174,"open_issues":35,"watchers":260,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenSC/OpenSC/pulls/459"},"html":{"href":"https://github.com/OpenSC/OpenSC/pull/459"},"issue":{"href":"https://api.github.com/repos/OpenSC/OpenSC/issues/459"},"comments":{"href":"https://api.github.com/repos/OpenSC/OpenSC/issues/459/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenSC/OpenSC/pulls/459/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenSC/OpenSC/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenSC/OpenSC/pulls/459/commits"},"statuses":{"href":"https://api.github.com/repos/OpenSC/OpenSC/statuses/365989b5e6084539f15d252cfafdc89771196b93"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":4,"review_comments":0,"commits":2,"additions":23,"deletions":10,"changed_files":1}}