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

std.zip: Invalid data yields RangeError in ZipArchive constructor #9787

Open
dlangBugzillaToGithub opened this issue Jan 21, 2020 · 1 comment

Comments

@dlangBugzillaToGithub
Copy link

moonlightsentinel reported this on 2020-01-21T18:40:11Z

Transfered from https://issues.dlang.org/show_bug.cgi?id=20523

Description

Test case for a truncated zip file:

unittest
{
    enum data = "\x50\x4b\x01\x02\x50\x4b\x05\x06\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";

    scope zip = new ZipArchive(cast(void[]) data);
}

This causes a range error at std.zip.d:1335
@dlangBugzillaToGithub
Copy link
Author

dlang-bot commented on 2020-01-24T13:21:13Z

@berni44 created dlang/phobos pull request #7365 "Fix Issue 20523 - std.zip: Invalid data yields RangeError in ZipArchive constructor" fixing this issue:

- Fix Issue 20523 - std.zip: Invalid data yields RangeError in
  ZipArchive constructor

https://github.com/dlang/phobos/pull/7365

@LightBender LightBender removed the P3 label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants