coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] b2sum: --length: fix upper bound check


From: Collin Funk
Subject: Re: [PATCH] b2sum: --length: fix upper bound check
Date: Sat, 30 Aug 2025 19:31:10 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

Pádraig Brady <P@draigBrady.com> writes:

> * src/digest.c (main): Don't saturate -l to BLAKE2B_MAX_LEN,
> so that the subsequent bounds check is performed.
> * tests/cksum/b2sum.sh: Add a test case.
> * NEWS: Mention the fix introduced in commit v9.5-71-gf2c84fe63
> ---
>  NEWS                 | 4 ++++
>  src/digest.c         | 2 +-
>  tests/cksum/b2sum.sh | 3 +++
>  3 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/NEWS b/NEWS
> index f2e7c9e6e..988cb96a8 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -4,6 +4,10 @@ GNU coreutils NEWS                                    -*- 
> outline -*-
>  
>  ** Bug fixes
>  
> +  'b2sum' will diagnose --length values that are too big.
> +  Previously it would have silently assumed 512 for any larger values.
> +  [bug introduced in coreutils-9.6]

That doesn't seem like the worst behavior to me. But clearly was not the
intent, and I think the fixed behavior is better.

Thanks for the fix.

Collin



reply via email to

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