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

Invalid PNG file generation #147

Closed
newpavlov opened this issue Jun 21, 2019 · 6 comments
Closed

Invalid PNG file generation #147

newpavlov opened this issue Jun 21, 2019 · 6 comments

Comments

@newpavlov
Copy link

Compressing 1.pnm in this archive using png crate results in an invalid PNG file. EyeOfGnome reports "bad adaptive filter value". Compression code can be found in the same archive. Changing just one pixel (uncomment line 16 in main.rs) results in a correct file being generated.

@aschampion
Copy link
Contributor

I ran into a similar issue and created a reproduction repo here before finding this issue. Debug hits the same assertion as image-rs/deflate-rs#18. Would be nice to (in order of declining preference) switch to a fuzzed encoder (parallel to the decoder discussion in #151), fix the bug, and/or make the assertion in release mode since I only lucked into noticing the corrupted data in a production tool.

@newpavlov
Copy link
Author

newpavlov commented Nov 8, 2019

This issue is still not fixed since png uses deflate v0.7 and the bug was fixed only in v0.8.

@fintelia fintelia reopened this Nov 8, 2019
@oyvindln
Copy link
Contributor

oyvindln commented Feb 4, 2020

Dependency is updated in the git repo, but the versions on crates.io still depend on 0.7.

@Shnatsel
Copy link
Contributor

The fix has been in master for a while. Can we get a new point release on crates.io with the fix?

@HeroicKatora
Copy link
Member

It's going on the schedule for this weekend.

@HeroicKatora
Copy link
Member

png 0.16.0 has been published, and is going to be updated into image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants