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

7z inflation fails. #556

Closed
TomerHeber opened this issue Jun 5, 2015 · 7 comments
Closed

7z inflation fails. #556

TomerHeber opened this issue Jun 5, 2015 · 7 comments

Comments

@TomerHeber
Copy link
Contributor

Hi,

I'm using the latest libarchive release (not master).

I've created a file with 7zip (lzma - default settings).
I then tried to inflate it VIA libarchive.

I was unable to get it to work. It would fail without an error reason.

So I started debugging the code and discovered that I'm missing the "seek_callback" (Too bad there is no error code for that).

After implementing the "seek_callback" I tried again. It had failed again but this time it told me the 7zip header is corrupted.

So I started debugging a second time and discovered there is a bug in the libarchive 7zip code. It would seem that libarchive 7zip has issues with handling the "Dummy" header (kDummy). The "Dummy" header is for padding and is often of length 0. The current code has issues with handling headers of length 0.

After fixing the bug - inflation was successful.

To reproduce:

  1. Create a 7z archive VIA 7zip.
  2. Try inflating it with libarchive (don't forget to add a seek_callback).

10x,
Tomer.

@kientzle
Copy link
Contributor

kientzle commented Jun 6, 2015

Thank you for the report.

The best way to get such issues fixed is to provide us with a small sample file (ideally, just a few kilobytes) that demonstrates the problem. We can then add that to our test suite, which will both help us quickly fix the problem and ensure it does not reappear in the future.

Of course, if you also have a fix for the bug, we always appreciate pull requests.

@Marshallx
Copy link

I think I have the same problem - any 7z file created in the latest 7zip beta.
7-zip itself can reopen/extract these archives ok.

@TomerHeber
Copy link
Contributor Author

Hopefully I'll find the time to submit the bug fix asap.

On Tue, Jun 16, 2015, 17:35 Marshallx notifications@github.com wrote:

I think I have the same problem - any 7z file created in the latest 7zip
beta.
7-zip itself can reopen/extract these archives ok.


Reply to this email directly or view it on GitHub
#556 (comment)
.

TomerHeber added a commit to TomerHeber/libarchive that referenced this issue Jun 16, 2015
7z inflation fails
TomerHeber added a commit to TomerHeber/libarchive that referenced this issue Jun 16, 2015
@TomerHeber
Copy link
Contributor Author

Pull request created.
#560

kientzle added a commit that referenced this issue Jun 17, 2015
@kientzle
Copy link
Contributor

Thanks for the bug fix!

@Marshallx
Copy link

Hey, was this related to open issue
#535
?

@TomerHeber
Copy link
Contributor Author

Commented in #535 .

gperciva pushed a commit to Tarsnap/libarchive that referenced this issue Aug 30, 2015
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

3 participants