emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#69546: closed (cksum: inconsistent handling of invalid length values


From: GNU bug Tracking System
Subject: bug#69546: closed (cksum: inconsistent handling of invalid length values)
Date: Mon, 04 Mar 2024 16:41:02 +0000

Your message dated Mon, 4 Mar 2024 16:39:05 +0000
with message-id <85c0d54c-d208-6eda-3997-d68e15f93d5d@draigBrady.com>
and subject line Re: bug#69546: cksum: inconsistent handling of invalid length 
values
has caused the debbugs.gnu.org bug report #69546,
regarding cksum: inconsistent handling of invalid length values
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
69546: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69546
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- 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



--- End Message ---
--- Begin Message --- Subject: Re: bug#69546: cksum: inconsistent handling of invalid length values Date: Mon, 4 Mar 2024 16:39:05 +0000 User-agent: Mozilla Thunderbird
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



--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]