-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Always skip over any additional, unexpected, RSTx (restart) markers in corrupt JPEG images (issue 11794) #11805
Conversation
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/9557a5b9bfa42af/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.215.176.217:8877/4d2f23e5081ef12/output.txt |
From: Bot.io (Windows)FailedFull output at http://54.215.176.217:8877/4d2f23e5081ef12/output.txt Total script time: 1.76 mins
Image differences available at: http://54.215.176.217:8877/4d2f23e5081ef12/reftest-analyzer.html#web=eq.log |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/9557a5b9bfa42af/output.txt Total script time: 19.68 mins
Image differences available at: http://54.67.70.0:8877/9557a5b9bfa42af/reftest-analyzer.html#web=eq.log |
…MCU parsing in the `decodeScan` function Some of the code in `src/core/jpg.js` is fairly old, and has with time become unnecessary when the surrounding code has been updated to handle various types of JPEG corruption. In particular the `if (!marker || marker <= 0xff00) { ... }` branch is now dead code, since: - The `!marker` case can no longer happen, since we would already have broken out of the loop thanks to the `!fileMarker` branch a handful of lines above. - The `marker <= 0xff00` case can also no longer happen, since the `findNextFileMarker` function validate markers much more thoroughly (by checking `marker >= 0xffc0 && marker <= 0xfffe`). Hence we'd again have broken out of the loop via the `!fileMarker` branch above when no valid marker was found.
…n corrupt JPEG images (issue 11794)
6331328
to
06f6f87
Compare
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.215.176.217:8877/9589d151ab25112/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/c2806f0da0d9ee1/output.txt |
From: Bot.io (Windows)FailedFull output at http://54.215.176.217:8877/9589d151ab25112/output.txt Total script time: 25.75 mins
Image differences available at: http://54.215.176.217:8877/9589d151ab25112/reftest-analyzer.html#web=eq.log |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/c2806f0da0d9ee1/output.txt Total script time: 60.00 mins |
/botio-linux test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/6285510acc715d1/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/6285510acc715d1/output.txt Total script time: 20.20 mins
Image differences available at: http://54.67.70.0:8877/6285510acc715d1/reftest-analyzer.html#web=eq.log |
/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/e5096202324eda6/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/e5096202324eda6/output.txt Total script time: 2.55 mins Published |
Looks good to me! /botio makeref (also for the other PR) |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @timvandermeij received. Current queue size: 2 Live output at: http://54.215.176.217:8877/e8e6fe5734ad20c/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_makeref from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/b00e8addcc1cf5e/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/b00e8addcc1cf5e/output.txt Total script time: 18.18 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/e8e6fe5734ad20c/output.txt Total script time: 23.73 mins
|
Fixes #11794
Much smaller/simpler diff with https://github.com/mozilla/pdf.js/pull/11805/files?w=1
With the changes in this PR, I believe that it should also be possible to simply remove the code-block shown below. However, I wanted to avoid increasing the size/scope of this PR even more, given that it already contains a clean-up commit.
pdf.js/src/core/jpg.js
Lines 456 to 465 in a4dd081