Bug#736872: busybox: zcat does not decompress file which do not have a .gz suffix
Package: busybox
Version: 1:1.22.0-2
Severity: critical
Justification: breaks the whole system
The zcat applet seems to behave like cat unless the input file has a .gz
suffix:
Given two identical files (compressed string "Hello World"), one with a .gz
suffix and one without:
$ file test test.gz
test: gzip compressed data, was "test", from Unix, last modified: Mon Jan 27 20:31:45 2014
test.gz: gzip compressed data, was "test", from Unix, last modified: Mon Jan 27 20:31:45 2014
$ md5sum test test.gz
9001811fcfd18c9479e98f78ebfd364b test
9001811fcfd18c9479e98f78ebfd364b test.gz
Regular zcat behaves as expected:
$ zcat test | file -
/dev/stdin: ASCII text
$ zcat test.gz | file -
/dev/stdin: ASCII text
But busybox zcat does not:
$ busybox zcat test | file -
/dev/stdin: gzip compressed data, was "test", from Unix, last modified: Mon Jan 27 20:31:45 2014
$ busybox zcat test.gz | file -
/dev/stdin: ASCII text
If the input file does not have a .gz suffix then zcat is behaving
like plain cat:
$ cat test | md5sum
9001811fcfd18c9479e98f78ebfd364b -
$ busybox zcat test | md5sum
9001811fcfd18c9479e98f78ebfd364b -
It works correctly when operating on stdin:
$ cat test | busybox zcat | file -
/dev/stdin: ASCII text
I've given this severity critical since it break the installer by breaking at
least net-retriever.
The version currently in Jessie (1:1.21.0-1) seems to be OK:
$ busybox zcat test | file -
/dev/stdin: ASCII text
-- System Information:
Debian Release: jessie/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.10-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages busybox depends on:
ii libc6 2.17-92+b1
busybox recommends no packages.
busybox suggests no packages.
-- no debconf information
Reply to: