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

Avoid accidentally getting the entire font file in readNameTable (issue 7020) #7049

Merged
merged 1 commit into from
Mar 2, 2016
Merged

Avoid accidentally getting the entire font file in readNameTable (issue 7020) #7049

merged 1 commit into from
Mar 2, 2016

Conversation

Snuffleupagus
Copy link
Collaborator

In the PDF file in question, some of the 'name' table entries have record.length === 0. This becomes problematic in the non-unicode case, since font.getBytes(0) will fetch the entire stream.
Given that OTS rejects 'name' entries larger than 2^16, this thus explain the sanitizer errors.

Fixes #7020.

…ssue 7020)

In the PDF file in question, some of the 'name' table entries have `record.length === 0`. This becomes problematic in the non-unicode case, since `font.getBytes(0)` will fetch the *entire* stream.
Given that OTS rejects 'name' entries larger than `2^16`, this thus explain the sanitizer errors.

Fixes 7020.
@Snuffleupagus
Copy link
Collaborator Author

/botio-windows preview

@pdfjsbot
Copy link

pdfjsbot commented Mar 1, 2016

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/57cd1dc13651dd8/output.txt

@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Mar 1, 2016

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/8db2d05f6e5679b/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Mar 1, 2016

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/674c00fbb153693/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Mar 1, 2016

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/674c00fbb153693/output.txt

Total script time: 20.35 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@pdfjsbot
Copy link

pdfjsbot commented Mar 1, 2016

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/8db2d05f6e5679b/output.txt

Total script time: 22.18 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@brendandahl
Copy link
Contributor

/botio makeref

@pdfjsbot
Copy link

pdfjsbot commented Mar 1, 2016

From: Bot.io (Linux)


Received

Command cmd_makeref from @brendandahl received. Current queue size: 1

Live output at: http://107.21.233.14:8877/06f77a103310b7e/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Mar 1, 2016

From: Bot.io (Windows)


Received

Command cmd_makeref from @brendandahl received. Current queue size: 1

Live output at: http://107.22.172.223:8877/98d735ea2736270/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Mar 1, 2016

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/98d735ea2736270/output.txt

Total script time: 19.87 mins

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

@pdfjsbot
Copy link

pdfjsbot commented Mar 1, 2016

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/06f77a103310b7e/output.txt

Total script time: 21.32 mins

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

brendandahl added a commit that referenced this pull request Mar 2, 2016
Avoid accidentally getting the entire font file in `readNameTable` (issue 7020)
@brendandahl brendandahl merged commit 6b1de4a into mozilla:master Mar 2, 2016
@brendandahl
Copy link
Contributor

Nice!

@Snuffleupagus Snuffleupagus deleted the issue-7020 branch March 2, 2016 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants