Skip to content
This repository was archived by the owner on Nov 9, 2020. It is now read-only.
This repository was archived by the owner on Nov 9, 2020. It is now read-only.

Properly handle non-UTF8 filenames in Zip #53

@punkeel

Description

@punkeel
	at java.base/java.lang.StringCoding.throwMalformed(StringCoding.java:685)
	at java.base/java.lang.StringCoding.decodeUTF8_0(StringCoding.java:768)
	at java.base/java.lang.StringCoding.newStringUTF8NoRepl(StringCoding.java:965)
	at java.base/java.lang.System$2.newStringUTF8NoRepl(System.java:2197)
	at java.base/java.util.zip.ZipCoder$UTF8.toString(ZipCoder.java:60)
	at java.base/java.util.zip.ZipCoder.toString(ZipCoder.java:87)
	at java.base/java.util.zip.ZipInputStream.readLOC(ZipInputStream.java:301)
	at java.base/java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:123)
	at xyz.docbleach.module.zip.ArchiveBleach.sanitize(ArchiveBleach.java:44)
	at xyz.docbleach.api.bleach.CompositeBleach.sanitize(CompositeBleach.java:74)
	at xyz.docbleach.api.BleachSession.sanitize(BleachSession.java:71)
	at xyz.docbleach.cli.Main.sanitize(Main.java:81)
	at xyz.docbleach.cli.Main.main(Main.java:54)
Caused by: java.nio.charset.MalformedInputException: Input length = 1
	... 13 more

Process finished with exit code 1

Sample file: e35d68feda25f401da03883da1e9c437

Archive:  VirusShare_e35d68feda25f401da03883da1e9c437
Zip file size: 1978422 bytes, number of entries: 4
drwx---     3.1 fat        0 bx stor 13-Jun-24 09:44 bulletstorm-trainer18/
-rwxa--     3.1 fat  2030080 bx defN 11-Mar-12 21:16 bulletstorm-trainer18/BS+28Tr-LinGon.exe
-rw-a--     3.1 fat      893 tx defN 13-Jun-24 09:48 bulletstorm-trainer18/+�+���+��+��.txt
-rw-a--     3.1 fat      151 tx defN 13-Mar-29 17:14 bulletstorm-trainer18/+�+���+��+��.url
4 files, 2031124 bytes uncompressed, 1977223 bytes compressed:  2.7%

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions