Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust incorrect first obj number of "free" xref entry in XRef_readXRefTable (issue 7229) #7233

Merged
merged 2 commits into from
Apr 21, 2016
Merged

Conversation

Snuffleupagus
Copy link
Collaborator

Fixes #7229.

@yurydelendik
Copy link
Contributor

Not sure the issue 3248 connected with this one (even logic don't match). Looks like #7229 case contains incomplete xref table on purpose because parent one contains rest of the entries?

@Snuffleupagus
Copy link
Collaborator Author

Looks like #7229 case contains incomplete xref table on purpose because parent one contains rest of the entries?

Yes that appears to be correct, but the only thing that causes problems for us (as far as I can tell) is that one of the xref tables begins with:

xref
1 7  // Should be 0 7, which this patch attempts to adjust.
0000000000 65535 f
...

I'll admit that I've not worked with xref tables a whole lot, so what would a better approach be?

@yurydelendik
Copy link
Contributor

Oh, I see. Probably "Prev" section was generated by something like in 3248 case, then edited to create different section. Can we limit hack impact by comparing first with 1, e.g. if (i === 0 && entry.free && first === 1) { ?

@Snuffleupagus
Copy link
Collaborator Author

Can we limit hack impact by comparing first with 1, e.g. if (i === 0 && entry.free && first === 1) { ?

Sure, better now?

/botio preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.21.233.14:8877/6f2bfe26e1fadeb/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.22.172.223:8877/9e7707f96749d8f/output.txt

@yurydelendik
Copy link
Contributor

Thank you for the patch.

/botio makeref

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_makeref from @yurydelendik received. Current queue size: 0

Live output at: http://107.21.233.14:8877/f8fc78aa4a816d4/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_makeref from @yurydelendik received. Current queue size: 0

Live output at: http://107.22.172.223:8877/bcc8f89a2ebe4aa/output.txt

@yurydelendik yurydelendik merged commit d5c0008 into mozilla:master Apr 21, 2016
@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/bcc8f89a2ebe4aa/output.txt

Total script time: 20.19 mins

  • Lint: Passed
  • Make references: Passed
  • Check references: Passed

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/f8fc78aa4a816d4/output.txt

Total script time: 22.31 mins

  • Lint: Passed
  • Make references: Passed
  • Check references: Passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants