Bug 241848 - file(1) mis-handle gzip file as FLC file.
file(1) mis-handle gzip file as FLC file.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: file (Show other bugs)
4.3
All Linux
low Severity low
: ---
: ---
Assigned To: Daniel Novotny
:
Depends On:
Blocks: 641838
  Show dependency treegraph
 
Reported: 2007-05-31 01:23 EDT by masanari iida
Modified: 2010-10-11 05:11 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 641838 (view as bug list)
Environment:
Last Closed: 2009-05-18 16:06:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
sample files (160 bytes, application/octet-stream)
2008-02-01 05:41 EST, masanari iida
no flags Details
Proposed patch (730 bytes, patch)
2008-02-01 06:52 EST, Tomas Smetana
no flags Details | Diff
Fat fingers. This is the correct patch... (437 bytes, patch)
2008-02-01 06:57 EST, Tomas Smetana
no flags Details | Diff
testcase testing bug: 241848 454650 440551 (1.61 MB, application/x-gzip)
2008-12-12 08:28 EST, Jan Ščotka
no flags Details

  None (edit)
Description masanari iida 2007-05-31 01:23:18 EDT
Description of problem:
file(1) mis-handle gzip file as FLC file.

Version-Release number of selected component (if applicable):

# rpm -q file
file-4.10-2.EL4.4

How reproducible:
Only corner cases in normal environment.
100% if your follow my steps.


Steps to Reproduce:
# touch abc
# touch -m -t 200705080758.26 ./abc
# gzip abc
# file abc.gz
abc.gz: FLC file - 17983 frames width=768 pixels, height=25185 pixels, depth=99,
ticks/frame=0


Actual results:
abc.gz: FLC file - 17983 frames width=768 pixels, height=25185 pixels, depth=99,
ticks/frame=0


Expected results:
# file abc.gz
abc.gz: gzip compressed data, was "abc", from Unix


Additional info:
The file header looks like this.

00000000  1F 8B 08 08 12 AF 3F 46 00 03 65 65 65 65 65 65 ......?F..eeeeee

file(1) see 12 AF part at first, then recognize the file as FLC,
although other part of the header (1F 8B) include gzip style.
12 AF part of the gzip header is generated from "mtime" of the original file
by gzip. 
My understanding is gzip works as it should be.
But file(1) doesn't check the file header carefully.
Comment 1 Tomas Smetana 2008-02-01 05:20:41 EST
Could not reproduce:

[tsmetana@vmware111 ~]$ touch abc
[tsmetana@vmware111 ~]$ touch -m -t 200705080758.26 ./abc
[tsmetana@vmware111 ~]$ gzip abc
[tsmetana@vmware111 ~]$ file abc.gz 
abc.gz: gzip compressed data, was "abc", from Unix
[tsmetana@vmware111 ~]$ rpm -q file
file-4.10-2.EL4.4


Comment 2 masanari iida 2008-02-01 05:41:35 EST
Created attachment 293705 [details]
sample files

abc_all.tar.gz include 2 sample files,
abc1.gz and abc2.gz.
Both files are generated following my reproduce steps.
Comment 3 Tomas Smetana 2008-02-01 06:51:05 EST
Thanks.  I have reproduced the bug with the attached files.

Seems that putting animation after compress when concatenating the magic files
solves the problem.
Comment 4 Tomas Smetana 2008-02-01 06:52:49 EST
Created attachment 293713 [details]
Proposed patch
Comment 5 Tomas Smetana 2008-02-01 06:57:31 EST
Created attachment 293714 [details]
Fat fingers. This is the correct patch...
Comment 6 RHEL Product and Program Management 2008-02-01 14:07:38 EST
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".
Comment 7 RHEL Product and Program Management 2008-09-05 13:06:57 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 10 Daniel Novotny 2008-10-22 06:21:36 EDT
fixed in file-4.10-6.el4
Comment 12 Jan Ščotka 2008-12-12 08:28:18 EST
Created attachment 326726 [details]
testcase testing bug: 241848 454650 440551 

# tar xvf file_badres.tar.gz
# cd file_badres
# ./runtest.sh
Comment 15 errata-xmlrpc 2009-05-18 16:06:16 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0954.html

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