-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Handle corrupt ASCII85Decode inline images with whitespace "inside" of the EOD marker (issue 10614) #10615
Handle corrupt ASCII85Decode inline images with whitespace "inside" of the EOD marker (issue 10614) #10615
Conversation
…f the EOD marker (issue 10614) There's a number of things wrong with the PDF document, since its inline images are first all *a lot* larger than the 4 KB limit (as mandated by the specification, see https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#G7.1852045). Furthermore the actual ASCII85Decode data is interspersed with *a lot* of needless whitespace, in particular also "inside" of the EOD (end-of-data) marker which thus completely breaks the detection. Note that according to the specification, see https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#G6.1940130, this patch should be safe since it explicitly mentions that *all* whitespace should be ignored.
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.215.176.217:8877/6357392be4e4e1d/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/bee5316a2709db1/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/bee5316a2709db1/output.txt Total script time: 18.08 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/6357392be4e4e1d/output.txt Total script time: 25.69 mins
|
Note also the Lines 963 to 965 in e1b01a6
Lines 987 to 989 in e1b01a6
/cc @brendandahl Do you have time to review this patch? |
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/8c2d4fd4f3187da/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/8c2d4fd4f3187da/output.txt Total script time: 1.81 mins Published |
/botio makeref |
From: Bot.io (Linux m4)ReceivedCommand cmd_makeref from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/1c1e797f38c045d/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @timvandermeij received. Current queue size: 0 Live output at: http://54.215.176.217:8877/676618f9b7704bf/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/1c1e797f38c045d/output.txt Total script time: 16.42 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/676618f9b7704bf/output.txt Total script time: 23.47 mins
|
Thank you for finding and fixing this bug! |
There's a number of things wrong with the PDF document, since its inline images are first all a lot larger than the 4 KB limit (as mandated by the specification, see https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#G7.1852045).
Furthermore the actual ASCII85Decode data is interspersed with a lot of needless whitespace, in particular also "inside" of the EOD (end-of-data) marker which thus completely breaks the detection.
Note that according to the specification, see https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#G6.1940130, this patch should be safe since it explicitly mentions that all whitespace should be ignored.
Fixes #10614.