-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Try to recover when encountering JPEG markers with too short marker lengths (issue 8169) #8170
Conversation
/botio-linux preview |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/37ab67f16a2e0c7/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/37ab67f16a2e0c7/output.txt Total script time: 2.17 mins Published |
/botio test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/4833c3b76d1fd0e/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/c65d67d38c81084/output.txt |
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/c65d67d38c81084/output.txt Total script time: 22.24 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/4833c3b76d1fd0e/output.txt Total script time: 28.43 mins
|
src/core/jpg.js
Outdated
// If the length of the previous block is incorrect (too short), | ||
// treat the current "marker" as padding and skip past it when | ||
// the next marker is a valid one (fixes issue8169.pdf). | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was a "luck" that there is no other data in-between. We need to add a check to the readDataBlock and if there is no marker after the read block, throw a warning and seek a next marker starting from start of the read block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point; is the updated patch better?
Note: I've not had time to run all tests locally yet, so if the approach is OK I'll trigger testing later.
…engths (issue 8169) The issue with the JPEG image in question, is that the COM (Comment) marker has an incorrect length entry. Fixes 8169.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
/botio test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/4cbe5e323b6b2db/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/dcf28ce3b689d02/output.txt |
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/dcf28ce3b689d02/output.txt Total script time: 22.45 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/4cbe5e323b6b2db/output.txt Total script time: 30.13 mins
|
/botio makeref |
From: Bot.io (Linux)ReceivedCommand cmd_makeref from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/47628de34e2a72a/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.215.176.217:8877/ff5d443e665a1cf/output.txt |
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/ff5d443e665a1cf/output.txt Total script time: 21.67 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/47628de34e2a72a/output.txt Total script time: 29.05 mins
|
Try to recover when encountering JPEG markers with too short marker lengths (issue 8169)
The issue with the JPEG image in question, is that the COM (Comment) marker has an incorrect length entry.
Fixes #8169.