Skip to content
This repository was archived by the owner on Sep 11, 2022. It is now read-only.

Runtime panic when trying to resize 4:1:1 YCbCr image #37

Closed
carl-mastrangelo opened this issue Oct 5, 2015 · 2 comments
Closed

Runtime panic when trying to resize 4:1:1 YCbCr image #37

carl-mastrangelo opened this issue Oct 5, 2015 · 2 comments
Labels

Comments

@carl-mastrangelo
Copy link

I got a runtime panic when trying to resize a jpeg image that has 4x1 Chroma Subsampling, aka. image.YCbCrSubsampleRatio411. In ycc.go, it seems the default is 444 if no other sample is matched, which causes an index out of range panic.

I have a reproducible test program and image, if desired.

@carl-mastrangelo
Copy link
Author

Friendly ping. This represents a DoS vector when the picture comes from an untrusted source. In my case it is creating a thumbnail from a user uploaded picture.

@nfnt
Copy link
Owner

nfnt commented Feb 21, 2018

Fixed by #57.

@nfnt nfnt closed this as completed Feb 21, 2018
@nfnt nfnt mentioned this issue Feb 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants