GNU bug report logs - #79231
sends non-printable characters to the terminal in error message

Previous Next

Package: gzip;

Reported by: Vincent Lefevre <vincent <at> vinc17.net>

Date: Wed, 13 Aug 2025 14:51:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Antonio Diaz Diaz <antonio <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Vincent Lefevre <vincent <at> vinc17.net>, 79231 <at> debbugs.gnu.org, Collin Funk <collin.funk1 <at> gmail.com>
Subject: bug#79231: sends non-printable characters to the terminal in error message
Date: Mon, 18 Aug 2025 01:31:38 +0200
Paul Eggert wrote:
> On 8/16/25 19:01, Collin Funk wrote:
>> Is there any reason that gzip doesn't use quote and error from Gnulib?
>> e.g. to avoid dependencies on locale stuff?
>
> Partly that, and partly because it's a symptom of a larger issue: gzip
> was written in a hurry and is poorly structured and people
> understandably don't want to mess with it.

Maybe an alternative to searching for all the places where gzip would need 
to be patched could be to reject outright any file name containing any 
control char in the range ( ch <= 31 && ch >= 1 ) || ch == 127

If a file with such a name needs to be decompressed, it can be redirected to 
standard input.

POSIX is encouraging implementations to disallow the creation of file names 
containing any bytes that have the encoded value of a <newline> character. 
See https://pubs.opengroup.org/onlinepubs/9799919799/utilities/compress.html 
section CHANGE HISTORY subsection Issue 8.

Since January 2024, GNU ed is rejecting by default file names containing 
control chars and nobody has complained yet.

Best regards,
Antonio.




This bug report was last modified 16 days ago.

Previous Next


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