GNU bug report logs - #49721
NAME flag incorrectly set

Previous Next

Package: gzip;

Reported by: gb2985 <at> gmail.com

Date: Sat, 24 Jul 2021 16:32:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49721 in the body.
You can then email your comments to 49721 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gzip <at> gnu.org:
bug#49721; Package gzip. (Sat, 24 Jul 2021 16:32:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to gb2985 <at> gmail.com:
New bug report received and forwarded. Copy sent to bug-gzip <at> gnu.org. (Sat, 24 Jul 2021 16:32:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lee Shallis <gb2985 <at> gmail.com>
To: bug-gzip <at> gnu.org
Subject: NAME flag incorrectly set
Date: Sat, 24 Jul 2021 11:14:25 +0100
I've been following a guide on the deflate algorithm (because I wanted
one where I could control how memory is allocated just as Lua allows)
and found when I put this:

echo "hello hello hello hello" | gzip

into the terminal gzip incorrectly set the NAME flag, it was only
after editing it out I was able to deflate the resulting file, the
same applies for this:

echo -n "abaabbbabaababbaababaaaabaaabbbbbaa" | gzip

Both of which are the examples given on
https://blog.za3k.com/understanding-gzip-2/




Information forwarded to bug-gzip <at> gnu.org:
bug#49721; Package gzip. (Sat, 24 Jul 2021 19:33:02 GMT) Full text and rfc822 format available.

Message #8 received at 49721 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: gb2985 <at> gmail.com
Cc: 49721 <at> debbugs.gnu.org
Subject: Re: bug#49721: NAME flag incorrectly set
Date: Sat, 24 Jul 2021 12:32:23 -0700
On 7/24/21 3:14 AM, Lee Shallis wrote:
> when I put this:
> 
> echo "hello hello hello hello" | gzip
> 
> into the terminal gzip incorrectly set the NAME flag

I suppose you're talking about the FNAME flag described by RFC 1952? I 
don't observe any problem with gzip 1.10:

$ echo "hello hello hello hello" | gzip | od -t x1
0000000 1f 8b 08 00 00 00 00 00 00 03 cb 48 cd c9 c9 57
0000020 c8 40 27 b9 00 00 88 59 0b 18 00 00 00
0000035

The FLG byte is 00, which means FNAME is not set.




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Sun, 25 Jul 2021 15:30:02 GMT) Full text and rfc822 format available.

Notification sent to gb2985 <at> gmail.com:
bug acknowledged by developer. (Sun, 25 Jul 2021 15:30:03 GMT) Full text and rfc822 format available.

Message #13 received at 49721-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: gb2985 <at> gmail.com
Cc: 49721-done <at> debbugs.gnu.org
Subject: Re: bug#49721: NAME flag incorrectly set
Date: Sun, 25 Jul 2021 08:29:32 -0700
On 7/25/21 8:24 AM, Lee Shallis wrote:
> I just noticed my misunderstanding, seems because I forgot to read the
> compression byte as a compression byte, it got read as the flags byte,
> so I was off by a byte when reading the flags without realising.

Thanks for following up. Closing the bug report.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 23 Aug 2021 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 241 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.