Issue 20523 - std.zip: Invalid data yields RangeError in ZipArchive constructor
Summary: std.zip: Invalid data yields RangeError in ZipArchive constructor
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P3 normal
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2020-01-21 18:40 UTC by moonlightsentinel
Modified: 2024-12-01 16:36 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description moonlightsentinel 2020-01-21 18:40:11 UTC
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
Comment 1 Dlang Bot 2020-01-24 13:21:13 UTC
@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
Comment 2 dlangBugzillaToGithub 2024-12-01 16:36:13 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/phobos/issues/9787

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB