Skip to content

Commit

Permalink
add test case for gap before central directory
Browse files Browse the repository at this point in the history
currently accepted by both libzip and InfoZIP
  • Loading branch information
0-wiz-0 committed Jul 27, 2024
1 parent a03ee7a commit f8cd679
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Binary file added regress/incons-gap-before-cd.zip
Binary file not shown.
4 changes: 3 additions & 1 deletion regress/open_incons.test
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ file incons-eocd-magic-bad.zzip incons-eocd-magic-bad.zip
file incons-file-count-high.zzip incons-file-count-high.zip
file incons-file-count-low.zzip incons-file-count-low.zip
file incons-file-count-overflow.zzip incons-file-count-overflow.zip
file incons-gap-before-cd.zzip incons-gap-before-cd.zip
file incons-gap-before-eocd.zzip incons-gap-before-eocd.zip
file incons-local-compression-method.zzip incons-local-compression-method.zip
file incons-local-compsize-larger.zzip incons-local-compsize-larger.zip
Expand All @@ -34,7 +35,7 @@ file incons-local-filename-short.zzip incons-local-filename-short.zip
file incons-local-filename.zzip incons-local-filename.zip
file incons-local-magic-bad.zzip incons-local-magic-bad.zip
file incons-local-size-larger.zzip incons-local-size-larger.zip
arguments -c incons-archive-comment-longer.zzip incons-archive-comment-shorter.zzip incons-cdoffset.zzip incons-central-compression-method.zzip incons-central-compsize-larger-toolarge.zzip incons-central-compsize-larger.zzip incons-central-compsize-smaller.zzip incons-central-crc.zzip incons-central-date.zzip incons-central-file-comment-longer.zzip incons-central-file-comment-shorter.zzip incons-central-magic-bad.zzip incons-central-magic-bad2.zzip incons-central-size-larger.zzip incons-data.zzip incons-ef-central-size-wrong.zzip incons-ef-local-id-size.zzip incons-ef-local-id.zzip incons-ef-local-size.zzip incons-eocd-magic-bad.zzip incons-file-count-high.zzip incons-file-count-low.zzip incons-file-count-overflow.zzip incons-gap-before-eocd.zzip incons-local-compression-method.zzip incons-local-compsize-larger.zzip incons-local-compsize-smaller.zzip incons-local-crc.zzip incons-local-filename-long.zzip incons-local-filename-missing.zzip incons-local-filename-short.zzip incons-local-filename.zzip incons-local-magic-bad.zzip incons-local-size-larger.zzip
arguments -c incons-archive-comment-longer.zzip incons-archive-comment-shorter.zzip incons-cdoffset.zzip incons-central-compression-method.zzip incons-central-compsize-larger-toolarge.zzip incons-central-compsize-larger.zzip incons-central-compsize-smaller.zzip incons-central-crc.zzip incons-central-date.zzip incons-central-file-comment-longer.zzip incons-central-file-comment-shorter.zzip incons-central-magic-bad.zzip incons-central-magic-bad2.zzip incons-central-size-larger.zzip incons-data.zzip incons-ef-central-size-wrong.zzip incons-ef-local-id-size.zzip incons-ef-local-id.zzip incons-ef-local-size.zzip incons-eocd-magic-bad.zzip incons-file-count-high.zzip incons-file-count-low.zzip incons-file-count-overflow.zzip incons-gap-before-cd.zzip incons-gap-before-eocd.zzip incons-local-compression-method.zzip incons-local-compsize-larger.zzip incons-local-compsize-smaller.zzip incons-local-crc.zzip incons-local-filename-long.zzip incons-local-filename-missing.zzip incons-local-filename-short.zzip incons-local-filename.zzip incons-local-magic-bad.zzip incons-local-size-larger.zzip
return 1
# tryopen does not test checksums, so this is fine.
# different extra fields local vs. central is fine
Expand Down Expand Up @@ -62,6 +63,7 @@ opening 'incons-eocd-magic-bad.zzip' returned error 35
opening 'incons-file-count-high.zzip' returned error 21/5
opening 'incons-file-count-low.zzip' returned error 21/5
opening 'incons-file-count-overflow.zzip' returned error 21/11
opening 'incons-gap-before-cd.zzip' succeeded, 1 entries
opening 'incons-gap-before-eocd.zzip' succeeded, 1 entries
opening 'incons-local-compression-method.zzip' returned error 21/6
opening 'incons-local-compsize-larger.zzip' returned error 21/6
Expand Down

0 comments on commit f8cd679

Please sign in to comment.