GNU bug report logs - #63780
Reversing the grep message output type matching binary files (without the -a option added) changed from stdout to stderr

Previous Next

Package: grep;

Reported by: "2773414454" <2773414454 <at> qq.com>

Date: Mon, 29 May 2023 04:56:02 UTC

Severity: normal

Tags: notabug

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

Bug is archived. No further changes may be made.

Full log


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

From: L A Walsh <coreutils <at> tlinx.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 2773414454 <at> qq.com, 63780 <at> debbugs.gnu.org
Subject: Re: bug#63780: Reversing the grep message output type matching binary
 files (without the -a option added) changed from stdout to stderr
Date: Thu, 01 Jun 2023 22:36:26 -0700

On 2023/06/01 14:18, Paul Eggert wrote:
> On 6/1/23 07:50, L A Walsh wrote:
>> I thought binary files were skipped, by default
> 
> They're not. The '--binary-files=without-match' option enables that 
> behavior. With that option, this issue doesn't come up.
> 
>> if they want to scan binary files as
>> well as text, then positive results should be printed to stdout
> 
> Not if that would screw up the screen. This is a real problem with 
> arbitrary binary data, with real security implications.

If the output is displayed through a util like 'less', such binary data
is automatically filtered.


Perhaps it would be a good idea for grep to provide such filtering
(displaying <00><AH>, or such) for non-ascii data?

I have a command to restore my tty settings to the value they
were when I logged on.

Nevertheless, displaying <filename>: matches, without the text doesn't
seem to pose any security risks.




This bug report was last modified 1 year and 357 days ago.

Previous Next


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