Bug 20523 – std.zip: Invalid data yields RangeError in ZipArchive constructor

Status
NEW
Severity
normal
Priority
P3
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-01-21T18:40:11Z
Last change time
2024-12-01T16:36:13Z
Keywords
pull
Assigned to
No Owner
Creator
moonlightsentinel
Moved to GitHub: phobos#9787 →

Comments

Comment #0 by moonlightsentinel — 2020-01-21T18:40:11Z
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 by dlang-bot — 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
Comment #2 by robert.schadek — 2024-12-01T16:36:13Z
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