From b0f850276c119bf517d51b20513afa4719985736 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 29 Jun 2020 08:43:54 -0500 Subject: [PATCH] Bump miniz-oxide version (#354) --- Cargo.toml | 2 +- src/symbolize/gimli/elf.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b5e04bc23..d7a08c08b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,7 +39,7 @@ compiler_builtins = { version = '0.1.2', optional = true } # Optional dependencies enabled through the `gimli-symbolize` feature, do not # use these features directly. addr2line = { version = "0.12.0", optional = true, default-features = false } -miniz_oxide = { version = "0.3.7", optional = true } +miniz_oxide = { version = "0.4.0", optional = true, default-features = false } [dependencies.object] version = "0.20.0" optional = true diff --git a/src/symbolize/gimli/elf.rs b/src/symbolize/gimli/elf.rs index ce703328d..26a17080b 100644 --- a/src/symbolize/gimli/elf.rs +++ b/src/symbolize/gimli/elf.rs @@ -3,7 +3,6 @@ use object::elf::{ELFCOMPRESS_ZLIB, SHF_COMPRESSED}; use object::read::elf::{CompressionHeader, FileHeader, SectionHeader, SectionTable, Sym}; use object::read::StringTable; use object::{BigEndian, Bytes, NativeEndian}; -use std::io::Cursor; #[cfg(target_pointer_width = "32")] type Elf = object::elf::FileHeader32; @@ -164,7 +163,8 @@ fn decompress_zlib(input: &[u8], output: &mut [u8]) -> Option<()> { let (status, in_read, out_read) = decompress( &mut DecompressorOxide::new(), input, - &mut Cursor::new(output), + output, + 0, TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF | TINFL_FLAG_PARSE_ZLIB_HEADER, ); if status == TINFLStatus::Done && in_read == input.len() && out_read == output.len() {