Bug 241848 - file(1) mis-handle gzip file as FLC file.
Summary: file(1) mis-handle gzip file as FLC file.
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: file   
(Show other bugs)
Version: 4.3
Hardware: All
OS: Linux
low
low
Target Milestone: ---
: ---
Assignee: Daniel Novotny
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 641838
TreeView+ depends on / blocked
 
Reported: 2007-05-31 05:23 UTC by masanari iida
Modified: 2010-10-11 09:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 641838 (view as bug list)
Environment:
Last Closed: 2009-05-18 20:06:16 UTC
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 10:41 UTC, masanari iida
no flags Details
Proposed patch (730 bytes, patch)
2008-02-01 11:52 UTC, Tomas Smetana
no flags Details | Diff
Fat fingers. This is the correct patch... (437 bytes, patch)
2008-02-01 11:57 UTC, Tomas Smetana
no flags Details | Diff
testcase testing bug: 241848 454650 440551 (1.61 MB, application/x-gzip)
2008-12-12 13:28 UTC, Jan Ščotka
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0954 normal SHIPPED_LIVE file bug fix update 2009-05-18 13:23:50 UTC

Description masanari iida 2007-05-31 05:23:18 UTC
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 10:20:41 UTC
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 10:41:35 UTC
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 11:51:05 UTC
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 11:52:49 UTC
Created attachment 293713 [details]
Proposed patch

Comment 5 Tomas Smetana 2008-02-01 11:57:31 UTC
Created attachment 293714 [details]
Fat fingers. This is the correct patch...

Comment 6 RHEL Product and Program Management 2008-02-01 19:07:38 UTC
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 17:06:57 UTC
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 10:21:36 UTC
fixed in file-4.10-6.el4

Comment 12 Jan Ščotka 2008-12-12 13:28:18 UTC
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 20:06:16 UTC
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.