GNU bug report logs - #69546
cksum: inconsistent handling of invalid length values

Previous Next

Package: coreutils;

Reported by: Daniel Hofstetter <dhofstet <at> gmail.com>

Date: Mon, 4 Mar 2024 15:46:01 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: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Daniel Hofstetter <dhofstet <at> gmail.com>
Subject: bug#69546: closed (Re: bug#69546: cksum: inconsistent handling of
 invalid length values)
Date: Mon, 04 Mar 2024 16:41:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#69546: cksum: inconsistent handling of invalid length values

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 69546 <at> debbugs.gnu.org.

-- 
69546: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69546
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Pádraig Brady <P <at> draigBrady.com>
To: Daniel Hofstetter <dhofstet <at> gmail.com>, 69546-done <at> debbugs.gnu.org
Subject: Re: bug#69546: cksum: inconsistent handling of invalid length values
Date: Mon, 4 Mar 2024 16:39:05 +0000
On 04/03/2024 15:44, Daniel Hofstetter wrote:
> Hi,
> 
> When specifying an invalid length value followed by a valid length
> value I get the following error:
> 
> $ printf "hello" | cksum --algo=blake2b --length=12 --length=8
> cksum: invalid length: ‘12’
> cksum: length is not a multiple of 8
> 
> However, if the invalid length value is a multiple of 8 and greater
> than 512 (the maximum digest length for blake2b), there is no error:
> 
> $ printf "hello" | cksum --algo=blake2b --length=123456 --length=8
> BLAKE2b-8 (-) = 29
> 
> I think the behavior should be the same in the two scenarios, whether
> it's showing an error or ignoring the invalid value.
> 
> I'm using coreutils 9.4.

I pushed a fix at:
https://github.com/coreutils/coreutils/commit/fea833591

Now only the last used --length is validated.

Marking this as done.

cheers,
Pádraig


[Message part 3 (message/rfc822, inline)]
From: Daniel Hofstetter <dhofstet <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: cksum: inconsistent handling of invalid length values
Date: Mon, 4 Mar 2024 16:44:54 +0100
Hi,

When specifying an invalid length value followed by a valid length
value I get the following error:

$ printf "hello" | cksum --algo=blake2b --length=12 --length=8
cksum: invalid length: ‘12’
cksum: length is not a multiple of 8

However, if the invalid length value is a multiple of 8 and greater
than 512 (the maximum digest length for blake2b), there is no error:

$ printf "hello" | cksum --algo=blake2b --length=123456 --length=8
BLAKE2b-8 (-) = 29

I think the behavior should be the same in the two scenarios, whether
it's showing an error or ignoring the invalid value.

I'm using coreutils 9.4.

Regards,
Daniel



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

Previous Next


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