zip adds entries with relative path including ".."
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zip (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: zip
The test case for this bug is very simple.
# mkdir A
# touch A/file
# mkdir B
# cd B
# zip -r archive.zip ../A
adding: ../A/ (stored 0%)
adding: ../A/file (stored 0%)
Actual result:
# zipinfo archive.zip
Zip file size: 306 bytes, number of entries: 2
drwxr-xr-x 3.0 unx 0 bx stor 10-Oct-29 14:29 ../A/
-rw-r--r-- 3.0 unx 0 bx stor 10-Oct-29 14:29 ../A/file
2 files, 0 bytes uncompressed, 0 bytes compressed: 0.0%
Expected result:
# zipinfo archive.zip
Zip file size: 306 bytes, number of entries: 2
drwxr-xr-x 3.0 unx 0 bx stor 10-Oct-29 14:29 A/
-rw-r--r-- 3.0 unx 0 bx stor 10-Oct-29 14:29 A/file
2 files, 0 bytes uncompressed, 0 bytes compressed: 0.0%
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: zip 3.0-3
ProcVersionSign
Uname: Linux 2.6.35-
NonfreeKernelMo
Architecture: i386
Date: Fri Oct 29 14:26:04 2010
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
ProcEnviron:
PATH=(custom, user)
LANG=en_US.utf8
SHELL=/bin/bash
SourcePackage: zip