{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/pdf.js/pulls/comments/24667562","id":24667562,"diff_hunk":"@@ -1125,6 +1125,11 @@ var JpxImage = (function JpxImageClosure() {\n             zeroBitPlanesTree = new TagTree(width, height);\n             precinct.inclusionTree = inclusionTree;\n             precinct.zeroBitPlanesTree = zeroBitPlanesTree;\n+            for(var l=0; l < layerNumber; l++){\n+              if(readBits(1)!== 0){","path":"src/core/jpx.js","position":5,"original_position":5,"commit_id":"dffa2e0ecd513ac531ff2cdd746d431515a11a12","original_commit_id":"dffa2e0ecd513ac531ff2cdd746d431515a11a12","user":{"login":"Snuffleupagus","id":2692120,"avatar_url":"https://avatars.githubusercontent.com/u/2692120?v=3","gravatar_id":"","url":"https://api.github.com/users/Snuffleupagus","html_url":"https://github.com/Snuffleupagus","followers_url":"https://api.github.com/users/Snuffleupagus/followers","following_url":"https://api.github.com/users/Snuffleupagus/following{/other_user}","gists_url":"https://api.github.com/users/Snuffleupagus/gists{/gist_id}","starred_url":"https://api.github.com/users/Snuffleupagus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Snuffleupagus/subscriptions","organizations_url":"https://api.github.com/users/Snuffleupagus/orgs","repos_url":"https://api.github.com/users/Snuffleupagus/repos","events_url":"https://api.github.com/users/Snuffleupagus/events{/privacy}","received_events_url":"https://api.github.com/users/Snuffleupagus/received_events","type":"User","site_admin":false},"body":"Nit: these lines are missing whitespaces, it should be\r\n```\r\nfor (var l = 0; l < layerNumber; l++) {\r\n  if (readBits(1) !== 0) {\r\n```","created_at":"2015-02-13T14:39:39Z","updated_at":"2015-02-13T14:39:39Z","html_url":"https://github.com/mozilla/pdf.js/pull/5727#discussion_r24667562","pull_request_url":"https://api.github.com/repos/mozilla/pdf.js/pulls/5727","_links":{"self":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/comments/24667562"},"html":{"href":"https://github.com/mozilla/pdf.js/pull/5727#discussion_r24667562"},"pull_request":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/5727"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/pdf.js/pulls/5727","id":29267969,"html_url":"https://github.com/mozilla/pdf.js/pull/5727","diff_url":"https://github.com/mozilla/pdf.js/pull/5727.diff","patch_url":"https://github.com/mozilla/pdf.js/pull/5727.patch","issue_url":"https://api.github.com/repos/mozilla/pdf.js/issues/5727","number":5727,"state":"open","locked":false,"title":"Fix a jpx inclusion tag tree bug","user":{"login":"jpambrun","id":718384,"avatar_url":"https://avatars.githubusercontent.com/u/718384?v=3","gravatar_id":"","url":"https://api.github.com/users/jpambrun","html_url":"https://github.com/jpambrun","followers_url":"https://api.github.com/users/jpambrun/followers","following_url":"https://api.github.com/users/jpambrun/following{/other_user}","gists_url":"https://api.github.com/users/jpambrun/gists{/gist_id}","starred_url":"https://api.github.com/users/jpambrun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpambrun/subscriptions","organizations_url":"https://api.github.com/users/jpambrun/orgs","repos_url":"https://api.github.com/users/jpambrun/repos","events_url":"https://api.github.com/users/jpambrun/events{/privacy}","received_events_url":"https://api.github.com/users/jpambrun/received_events","type":"User","site_admin":false},"body":"The current code only works when every code-block includes at least some coding pass in layer 0. Otherwise, the tag tree will have x preceding 0, where x is the number of layers before the code-block is first included (See section B.10.2 and B.10.4 of ITU-T Rec. T.800). Such file appears severely corrupted as everything read beyond that point is misaligned.\r\n\r\nThis commit purge the preceding zeros when the \u0001inclusionTree is constructed and throw an error if the number of preceding zeros does not match the current layer (Tag tree is invalid or the code-block was supposed to be included in a earlier packet).","created_at":"2015-02-13T14:26:25Z","updated_at":"2015-02-13T14:39:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b3184cf63242654d0bb67124008c271c00654bf7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/pdf.js/pulls/5727/commits","review_comments_url":"https://api.github.com/repos/mozilla/pdf.js/pulls/5727/comments","review_comment_url":"https://api.github.com/repos/mozilla/pdf.js/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla/pdf.js/issues/5727/comments","statuses_url":"https://api.github.com/repos/mozilla/pdf.js/statuses/dffa2e0ecd513ac531ff2cdd746d431515a11a12","head":{"label":"jpambrun:jpx-inclusionTagTree-bugFix","ref":"jpx-inclusionTagTree-bugFix","sha":"dffa2e0ecd513ac531ff2cdd746d431515a11a12","user":{"login":"jpambrun","id":718384,"avatar_url":"https://avatars.githubusercontent.com/u/718384?v=3","gravatar_id":"","url":"https://api.github.com/users/jpambrun","html_url":"https://github.com/jpambrun","followers_url":"https://api.github.com/users/jpambrun/followers","following_url":"https://api.github.com/users/jpambrun/following{/other_user}","gists_url":"https://api.github.com/users/jpambrun/gists{/gist_id}","starred_url":"https://api.github.com/users/jpambrun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpambrun/subscriptions","organizations_url":"https://api.github.com/users/jpambrun/orgs","repos_url":"https://api.github.com/users/jpambrun/repos","events_url":"https://api.github.com/users/jpambrun/events{/privacy}","received_events_url":"https://api.github.com/users/jpambrun/received_events","type":"User","site_admin":false},"repo":{"id":30758835,"name":"pdf.js","full_name":"jpambrun/pdf.js","owner":{"login":"jpambrun","id":718384,"avatar_url":"https://avatars.githubusercontent.com/u/718384?v=3","gravatar_id":"","url":"https://api.github.com/users/jpambrun","html_url":"https://github.com/jpambrun","followers_url":"https://api.github.com/users/jpambrun/followers","following_url":"https://api.github.com/users/jpambrun/following{/other_user}","gists_url":"https://api.github.com/users/jpambrun/gists{/gist_id}","starred_url":"https://api.github.com/users/jpambrun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpambrun/subscriptions","organizations_url":"https://api.github.com/users/jpambrun/orgs","repos_url":"https://api.github.com/users/jpambrun/repos","events_url":"https://api.github.com/users/jpambrun/events{/privacy}","received_events_url":"https://api.github.com/users/jpambrun/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jpambrun/pdf.js","description":"PDF Reader in JavaScript","fork":true,"url":"https://api.github.com/repos/jpambrun/pdf.js","forks_url":"https://api.github.com/repos/jpambrun/pdf.js/forks","keys_url":"https://api.github.com/repos/jpambrun/pdf.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jpambrun/pdf.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jpambrun/pdf.js/teams","hooks_url":"https://api.github.com/repos/jpambrun/pdf.js/hooks","issue_events_url":"https://api.github.com/repos/jpambrun/pdf.js/issues/events{/number}","events_url":"https://api.github.com/repos/jpambrun/pdf.js/events","assignees_url":"https://api.github.com/repos/jpambrun/pdf.js/assignees{/user}","branches_url":"https://api.github.com/repos/jpambrun/pdf.js/branches{/branch}","tags_url":"https://api.github.com/repos/jpambrun/pdf.js/tags","blobs_url":"https://api.github.com/repos/jpambrun/pdf.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jpambrun/pdf.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jpambrun/pdf.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/jpambrun/pdf.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jpambrun/pdf.js/statuses/{sha}","languages_url":"https://api.github.com/repos/jpambrun/pdf.js/languages","stargazers_url":"https://api.github.com/repos/jpambrun/pdf.js/stargazers","contributors_url":"https://api.github.com/repos/jpambrun/pdf.js/contributors","subscribers_url":"https://api.github.com/repos/jpambrun/pdf.js/subscribers","subscription_url":"https://api.github.com/repos/jpambrun/pdf.js/subscription","commits_url":"https://api.github.com/repos/jpambrun/pdf.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/jpambrun/pdf.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/jpambrun/pdf.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/jpambrun/pdf.js/issues/comments/{number}","contents_url":"https://api.github.com/repos/jpambrun/pdf.js/contents/{+path}","compare_url":"https://api.github.com/repos/jpambrun/pdf.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jpambrun/pdf.js/merges","archive_url":"https://api.github.com/repos/jpambrun/pdf.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jpambrun/pdf.js/downloads","issues_url":"https://api.github.com/repos/jpambrun/pdf.js/issues{/number}","pulls_url":"https://api.github.com/repos/jpambrun/pdf.js/pulls{/number}","milestones_url":"https://api.github.com/repos/jpambrun/pdf.js/milestones{/number}","notifications_url":"https://api.github.com/repos/jpambrun/pdf.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jpambrun/pdf.js/labels{/name}","releases_url":"https://api.github.com/repos/jpambrun/pdf.js/releases{/id}","created_at":"2015-02-13T14:05:56Z","updated_at":"2015-02-13T14:23:30Z","pushed_at":"2015-02-13T14:23:30Z","git_url":"git://github.com/jpambrun/pdf.js.git","ssh_url":"git@github.com:jpambrun/pdf.js.git","clone_url":"https://github.com/jpambrun/pdf.js.git","svn_url":"https://github.com/jpambrun/pdf.js","homepage":"","size":106114,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"8614c17c1df9a9eb250690162d69bf32ee84f4b9","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":1663468,"name":"pdf.js","full_name":"mozilla/pdf.js","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/pdf.js","description":"PDF Reader in JavaScript","fork":false,"url":"https://api.github.com/repos/mozilla/pdf.js","forks_url":"https://api.github.com/repos/mozilla/pdf.js/forks","keys_url":"https://api.github.com/repos/mozilla/pdf.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/pdf.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/pdf.js/teams","hooks_url":"https://api.github.com/repos/mozilla/pdf.js/hooks","issue_events_url":"https://api.github.com/repos/mozilla/pdf.js/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/pdf.js/events","assignees_url":"https://api.github.com/repos/mozilla/pdf.js/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/pdf.js/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/pdf.js/tags","blobs_url":"https://api.github.com/repos/mozilla/pdf.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/pdf.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/pdf.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/pdf.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/pdf.js/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/pdf.js/languages","stargazers_url":"https://api.github.com/repos/mozilla/pdf.js/stargazers","contributors_url":"https://api.github.com/repos/mozilla/pdf.js/contributors","subscribers_url":"https://api.github.com/repos/mozilla/pdf.js/subscribers","subscription_url":"https://api.github.com/repos/mozilla/pdf.js/subscription","commits_url":"https://api.github.com/repos/mozilla/pdf.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/pdf.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/pdf.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/pdf.js/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla/pdf.js/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/pdf.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/pdf.js/merges","archive_url":"https://api.github.com/repos/mozilla/pdf.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/pdf.js/downloads","issues_url":"https://api.github.com/repos/mozilla/pdf.js/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/pdf.js/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/pdf.js/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/pdf.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/pdf.js/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/pdf.js/releases{/id}","created_at":"2011-04-26T06:32:03Z","updated_at":"2015-02-13T14:33:52Z","pushed_at":"2015-02-12T23:40:46Z","git_url":"git://github.com/mozilla/pdf.js.git","ssh_url":"git@github.com:mozilla/pdf.js.git","clone_url":"https://github.com/mozilla/pdf.js.git","svn_url":"https://github.com/mozilla/pdf.js","homepage":"","size":106114,"stargazers_count":10479,"watchers_count":10479,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2372,"mirror_url":null,"open_issues_count":491,"forks":2372,"open_issues":491,"watchers":10479,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/5727"},"html":{"href":"https://github.com/mozilla/pdf.js/pull/5727"},"issue":{"href":"https://api.github.com/repos/mozilla/pdf.js/issues/5727"},"comments":{"href":"https://api.github.com/repos/mozilla/pdf.js/issues/5727/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/5727/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/5727/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/pdf.js/statuses/dffa2e0ecd513ac531ff2cdd746d431515a11a12"}}}}