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

AES cipher: make padding optional #5154

Merged
merged 1 commit into from
Aug 9, 2014

Conversation

Rob--W
Copy link
Member

@Rob--W Rob--W commented Aug 8, 2014

In the bad PDF of #5152, there is a block at some point without padding. This can be found by setting a breakpoint at

outputLength -= lastBlock[15];
. When the breakpoint is hit for the second time, it consists of a value that is greater than 16. Consequently the outputLength does not match the byte size of the result, and in the loop thereafter, "RangeError: Source is too large" is thrown.

I've fixed this by checking whether the tail is really a padding before removing it from the output.

@Snuffleupagus
Copy link
Collaborator

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Aug 8, 2014

From: Bot.io (Linux)


Received

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

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

yurydelendik added a commit that referenced this pull request Aug 9, 2014
AES cipher: make padding optional
@yurydelendik yurydelendik merged commit 13f1a96 into mozilla:master Aug 9, 2014
@yurydelendik
Copy link
Contributor

Looks good. Thanks

@yurydelendik
Copy link
Contributor

Ops, forgot testing :)

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Aug 9, 2014

From: Bot.io (Linux)


Received

Command cmd_test from @yurydelendik received. Current queue size: 1

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

@pdfjsbot
Copy link

pdfjsbot commented Aug 9, 2014

From: Bot.io (Windows)


Received

Command cmd_test from @yurydelendik received. Current queue size: 1

Live output at: http://107.22.172.223:8877/594f23fc311e730/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Aug 9, 2014

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/594f23fc311e730/output.txt

Total script time: 19.59 mins

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

@pdfjsbot
Copy link

pdfjsbot commented Aug 9, 2014

From: Bot.io (Linux)


Success

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

Total script time: 22.55 mins

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

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

Successfully merging this pull request may close these issues.

4 participants