-
Notifications
You must be signed in to change notification settings - Fork 15
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
Upgrade flate2 integration to v0.3.0 #200
Comments
I suspect you've missed - const ZLIB_VERSION: &'static str = "0.1.0\0";
+ const ZLIB_VERSION: &'static str = "1.3.0-zlib-rs-0.3.0\0"; in With that line added, your example input works
where in the fuzzer's -flate2 = { path = ".." }
+flate2 = { path = "..", default-features=false, features=["zlib-rs"] } and in the main -libz-rs-sys = { version = "0.2.1", optional = true, default-features = false, features = ["std", "rust-allocator"] }
+libz-rs-sys = { version = "0.3.0", optional = true, default-features = false, features = ["std", "rust-allocator"] } Does that work on your machine? |
Ah, so I did! I did not realize changing that was required, thanks! It does work correctly now. I'll open a PR to upgrade flate2 to v0.3.0 |
PR is up: rust-lang/flate2-rs#428 |
seems like this is resolved and the updated version will be merged soon, so I'm closing this |
It would be nice to upgrade flate2 to use v0.3.0 of zlib-rs, since it contains important fixes such as #165, #169, #172
I've attempted a naive bump from v0.2.1 to v0.3.0, but after running the flate2 roundtrip fuzzer I found that
deflateInit2
now returnsZ_VERSION_ERROR
when called fromflate2
.You can reproduce the issue by running the following command in
flate2
repository with the attached file:roundtrip_failing_input.fake_extension_to_make_github_accept_upload.pdf
This will work fine with zlib-rs 0.2.1 but fail with 0.3.0, complaining about an assertion failure on this line:
https://github.com/rust-lang/flate2-rs/blob/6fbd6d21151d0948ed94be8ac99b412d30315109/src/ffi/c.rs#L325
The text was updated successfully, but these errors were encountered: