As central directory headers can point to arbitrary locations, it's possible (although probably not spec legal per section 4.3.8 of APPNOTE.txt) to embed a local file header inside of the contents of another local file header. This PR adds two new files:
hello-txt-stored.jar: contains a stored (uncompressed) local file header for "Hello.txt", which contains an embedded local file header for the "secret message" version of "Hello.class"
hello-txt-type-0.jar: same as above, but using a deflate stream for "Hello.txt" with one type 0 (uncompressed) block. Theoretically may cause different behaviour for parsers which look for the end of a deflate stream when parsing local file headers.
Some zip parsers may not see files like these (e.g. if they only read local file headers sequentially). For example, running the zip comparison test shows that ZipInputStream does not see "Hello.class", while all other tested parsers see this file (including LL-Java-Zip).
As central directory headers can point to arbitrary locations, it's possible (although probably not spec legal per section 4.3.8 of APPNOTE.txt) to embed a local file header inside of the contents of another local file header. This PR adds two new files:
Some zip parsers may not see files like these (e.g. if they only read local file headers sequentially). For example, running the zip comparison test shows that ZipInputStream does not see "Hello.class", while all other tested parsers see this file (including LL-Java-Zip).