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

From: L A Walsh <[email-masked]>
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.