Skip to content
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

Force checking the color type before accessing pixels #42

Merged
merged 1 commit into from Aug 26, 2014
Merged

Force checking the color type before accessing pixels #42

merged 1 commit into from Aug 26, 2014

Conversation

@SimonSapin
Copy link
Member

SimonSapin commented Aug 26, 2014

… by making pixels fields of the enum variants.

This should help prevent bugs such as servo/servo#3154

[breaking-change]

r? @metajack

This is just proposing the idea for now. I haven’t tried to port Servo for this change.

@SimonSapin SimonSapin changed the title For checking the color type before accessing pixels Force checking the color type before accessing pixels Aug 26, 2014
… by making pixels fields of the enum variants.

This should help prevent bugs such as servo/servo#3154
@metajack

This comment has been minimized.

Copy link
Contributor

metajack commented on 0fae0f4 Aug 26, 2014

r+

metajack added a commit that referenced this pull request Aug 26, 2014
Force checking the color type before accessing pixels
@metajack metajack merged commit 6253dcd into master Aug 26, 2014
@metajack metajack deleted the enum branch Aug 26, 2014
SimonSapin added a commit to SimonSapin/servo that referenced this pull request Aug 26, 2014
servo/rust-png#42

This does *not* fix the issue in servo#3154, but makes it fail!()
instead of (maybe?) reading uninitalized memory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.