pdf.js/test
Rob Wu e211c25f06 Improve robustness of stream parser (invalid length)
When the parser finds a stream, it retrieves the Length from the stream
dictionary and advances the lexer to the offset as specified in Length.
If this Length is incorrect, the lexer could end up anywhere.

When the lexer gets in an invalid state, it could throw errors. For
example, in issue 6108, the lexer ends up inside the stream data. This
stream has the ASCIIHexDecode filter, so all characters are made up from
ASCII characters, and the lexer interprets it as a command token. Tokens
cannot be longer than 127 bytes, so eventually 128 bytes are consumed
and the lexer throws "Command token too long" error.

Another possible error is "Illegal character: 41" when the lexer happens
to end up at a ')' due to the length mismatch.

These problems are solved by catching lexer errors and recovering the
parser via the existing stream length detection branch.
2015-07-11 20:12:49 +02:00
..
features cleaned whitespace 2015-02-17 11:07:37 -05:00
font cleaned whitespace 2015-02-17 11:07:37 -05:00
mozcentral cleaned whitespace 2015-02-17 11:07:37 -05:00
pdfs Improve robustness of stream parser (invalid length) 2015-07-11 20:12:49 +02:00
resources Merge pull request #5905 from timvandermeij/specialpowers 2015-04-27 10:36:54 -07:00
stats cleaned whitespace 2015-02-17 11:07:37 -05:00
ttx Fix typo in test/ttx/README.md 2014-03-28 00:05:22 +01:00
unit Merge pull request #5585 from timvandermeij/annotation-layer-borderstyle 2015-07-01 10:48:12 -07:00
.gitignore Ignore test snapshots directory. 2013-03-15 11:24:08 -07:00
downloadutils.js Fixes lint warning W004 in /test 2014-04-11 00:02:33 +02:00
driver.js Implement an option to disable automatic scrolling 2015-05-21 20:19:36 +02:00
test_manifest.json Improve robustness of stream parser (invalid length) 2015-07-11 20:12:49 +02:00
test_slave.html Implement an option to disable automatic scrolling 2015-05-21 20:19:36 +02:00
test.js Add --downloadOnly flag to test.js 2015-07-06 17:17:11 +02:00
testutils.js Fixes lint warning W004 in /test 2014-04-11 00:02:33 +02:00
webbrowser.js Fail with a more informative error message if the browser executable path doesn't exist 2015-04-17 16:12:13 +02:00
webserver.js Fix lint error: "test/webserver.js: line 177, col 106, Line is too long." 2015-01-08 12:22:34 +01:00