Bug 1284896 - unzip print wrong non-ascii filenames on stdout
unzip print wrong non-ascii filenames on stdout
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: unzip (Show other bugs)
6.8
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: pstodulk
Robin Hack
:
Depends On: 885540
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-24 07:16 EST by pstodulk
Modified: 2015-12-15 11:36 EST (History)
4 users (show)

See Also:
Fixed In Version: unzip-6.0-4.el6
Doc Type: Bug Fix
Doc Text:
Cause: Previously Unzip used function "fnprintf* for secure printing of string, which masked all unprintable ascii characters by '?'. In other words. wide characters weren't supported. Consequence: Wide characters in filenames were evaluated as unprintable or "not safe for print" so were masked by '?'. Fix: Modify the function according to upstream solution to support non-ascii encoding. Result: Filenames with non-unicode encodings are printed correctly.
Story Points: ---
Clone Of:
: 1286165 (view as bug list)
Environment:
Last Closed: 2015-12-15 11:36:48 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description pstodulk 2015-11-24 07:16:33 EST
Unzip don't print right non-ascii filenames on stdout when you try print list of filenames inside archives and used -O/-I paramter with right encoding.

Reproducer:
1. create archive with non-ascii filenames (e.g. encoding CP866) - you can use this archive [0]
2. $ unzip -l -O 866 123.zip

Actual results:
Archive:  123.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
     3176  10-10-2014 16:24   TestLab2014_icrs.demo.nbki.ru.zip
   295517  10-02-2014 17:33   ???????? ??? ? ???????? ???????????.zip
---------                     -------
   298693                     2 files


[0] https://bugzilla.redhat.com/attachment.cgi?id=1097835
Comment 1 pstodulk 2015-11-24 07:18:08 EST
It's caused by function fnfilter() in extract.c, which doesn't support wide characters now and mask all these by character "?".
Comment 7 errata-xmlrpc 2015-12-15 11:36:48 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2648.html

Note You need to log in before you can comment on or make changes to this bug.