GNU bug report logs - #15644
Possible bug in md5sum, sha1 and sha2 checksum utilities

Previous Next

Package: coreutils;

Reported by: jock97 <at> ntlworld.com

Date: Fri, 18 Oct 2013 16:01:01 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


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

From: jock97 <at> ntlworld.com
To: bug-coreutils <at> gnu.org
Subject: Possible bug in md5sum, sha1 and sha2 checksum utilities
Date: Fri, 18 Oct 2013 14:48:39 +0100
Hi,
   First, I hope this isn't some strange manifestation of shell
backslash escaping that has fooled me. I've fiddled around trying to
eliminate that possibility, but it could still happen. Apologies if it is...

Anyway, what I think might be a bug is as follows:

If you use any of md5sum, sha1sum, sha224sum, sha256sum, sha384sum or
sha512sum (are there any others?) on a file whose name contains a
backslash, then the output is prefixed with what appears to be an
erroneous backslash.

I'm using version 7.1 of these GNU coreutils commands. The problem was
also present in version 6.9.

To demonstrate the problem, do the following at a shell prompt >>> :

# Create empty file with backslash in its name.
>>> touch 'jun\k'

# Checksum it.
>>> sha1sum 'jun\k'
\da39a3ee5e6b4b0d3255bfef95601890afd80709  jun\\k

# Checksum it via stdin.
>>> sha1sum <'jun\k'
da39a3ee5e6b4b0d3255bfef95601890afd80709  -

In case the backslashes don't make it through the email system, the file
has a single backslash in its name. The first checksum starts with a
backslash. The second doesn't. I think both outputs should be the same.

Redirecting the output to a file makes no difference, so I don't think
it's a terminal issue.

Regards,

Rodney Warren-Smith




This bug report was last modified 11 years and 302 days ago.

Previous Next


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