The problem described in the ticket seems to be caused by the way archive_zip.cpp scans for the zip header in function LocateCentralDirectory():
- The function first tests if the zip main directory is at EOF (normal case).
- If it is not there due to a comment, it starts scanning the last 64Kb max of the file for the main directory using ScanforEcdr(). However, the latter is calling FindRecord(), which apparently expects to find the "structure to find" at the start of the area to search (see line 500: ENSURE(p == start);). If the comment is "too small" so FindRecord() won't find the central directory at the start of the scan area, the assertion will trip.
In this revision, I created a test case using the test.zip from the ticket to demonstrate the problem.
Manual work required:
Since SVN does not accept binary files in patch files, manually create the directory binaries/data/mods/_test.lib and place the test.zip file from the ticket into there - the test case is designed to work with that archive.
The patch also provides a modified archive_zip.cpp with a bugfix, so applying it will not show an issue in the test suite, but after applying the patch and reverting archive_zip.cpp it should trip the assertion.