-
Notifications
You must be signed in to change notification settings - Fork 17.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
image/jpeg: "bad RST marker" error when decoding #40130
Comments
Change https://golang.org/cl/260837 mentions this issue: |
@haoyang-zheng Do you have the example file for this issue to test against? |
Change https://golang.org/cl/382754 mentions this issue: |
Change https://go.dev/cl/571236 mentions this issue: |
Change https://go.dev/cl/571236 mentions this issue: |
Change https://go.dev/cl/580755 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
The following error occurred when I decoded a specific image.
Part of binary data of the image
The correct marker here should be [ ff d0 ], but there is some ff bytes in front of it.
It seems that there is a consecutive 0xFF bytes in the SOS segment that causes problems in marker's matching.
This is a quote from jpeg Wikipedia.
https://en.wikipedia.org/wiki/JPEG#Syntax_and_structure
So I think this situation should be taken into account at image/jpeg/scan.go
go/src/image/jpeg/scan.go
Line 332 in 4f2a2d7
What did you expect to see?
Image successfully decoded
What did you see instead?
invalid JPEG format: bad RST marker
The text was updated successfully, but these errors were encountered: