GNU bug report logs - #64392
cksum: escaping issues of --check output

Previous Next

Package: coreutils;

Reported by: Christoph Anton Mitterer <calestyo <at> scientia.org>

Date: Sat, 1 Jul 2023 00:22:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Christoph Anton Mitterer <calestyo <at> scientia.org>
To: Pádraig Brady <P <at> draigBrady.com>, 64392 <at> debbugs.gnu.org
Subject: bug#64392: cksum: escaping issues of --check output
Date: Sat, 01 Jul 2023 21:12:41 +0200
On Sat, 2023-07-01 at 18:53 +0100, Pádraig Brady wrote:
> That's not a common case I suppose,
> so I'm amenable to using the consistent escaping here.

Good :-)


> Info docs already contain:
> 
> "Without ‘--zero’, if FILE contains a backslash, newline, or carriage
> return, the line is started with a backslash, and each problematic
> character in the file name is escaped with a backslash, making the
> output unambiguous even in the presence of arbitrary file names."


Well yes, but that's in like the "common" section.

Further down, for --tag, it's explicitly mentioned again there, that
there's the escaping when \ is present as leading escaping indicator.

For --untagged and --check there's no such further mentioning ... so at
least it's a bit inconsistent... and could lead people to think it
would happen only with --tag.


Actually I'd even more "definitely" describe the escaping algorithm
above, in the sense that any \ \r and \n are escaped, and that any
other \-sequence (like \" \0 \xXX etc.) are explicitly reserved for
future use.
This especially in hindsight that other tools may also use the
tagged/unttaged output formats and add their own add-ons assuming
they're free to do so.


Cheers,
Chris.




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

Previous Next


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