Skip to content

Commit

Permalink
add test case for file name containing a NUL byte
Browse files Browse the repository at this point in the history
  • Loading branch information
0-wiz-0 committed Jul 28, 2024
1 parent 3aa48f3 commit 4b11a65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Binary file added regress/incons-local-filename-nil-byte.zip
Binary file not shown.
6 changes: 4 additions & 2 deletions regress/open_incons.test
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ file incons-local-compsize-smaller.zzip incons-local-compsize-smaller.zip
file incons-local-crc.zzip incons-local-crc.zip
file incons-local-filename-long.zzip incons-local-filename-long.zip
file incons-local-filename-missing.zzip incons-local-filename-missing.zip
file incons-local-filename-nil-byte.zip incons-local-filename-nil-byte.zip

This comment has been minimized.

Copy link
@ouuan

ouuan Jul 29, 2024

A z in zzip is missed here.

This comment has been minimized.

Copy link
@0-wiz-0

0-wiz-0 Jul 29, 2024

Author Member

Fixed, thanks!

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
file incons-stored-size.zzip incons-stored-size.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-cd.zzip incons-gap-before-eocd.zzip incons-gap-before-local.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 incons-stored-size.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-gap-before-local.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-nil-byte.zzip incons-local-filename-short.zzip incons-local-filename.zzip incons-local-magic-bad.zzip incons-local-size-larger.zzip incons-stored-size.zzip
return 1
# tryopen does not test checksums, so this is fine.
# different extra fields local vs. central is fine
Expand Down Expand Up @@ -74,12 +75,13 @@ opening 'incons-local-compsize-smaller.zzip' returned error 21/6
opening 'incons-local-crc.zzip' returned error 21/6
opening 'incons-local-filename-long.zzip' returned error 17
opening 'incons-local-filename-missing.zzip' returned error 21/6
opening 'incons-local-filename-nil-byte.zzip' returned error 9
opening 'incons-local-filename-short.zzip' returned error 21/16
opening 'incons-local-filename.zzip' returned error 21/6
opening 'incons-local-magic-bad.zzip' returned error 19
opening 'incons-local-size-larger.zzip' returned error 21/6
opening 'incons-stored-size.zzip' succeeded, 1 entries
end-of-inline-data
stderr
31 errors
32 errors
end-of-inline-data

0 comments on commit 4b11a65

Please sign in to comment.