{{ message }}
Repository navigation
Commit ebcdac1
authored
uucore: reject over-length BLAKE2b digests when checking (#14508)
When verifying a checksum file, the BLAKE2b output length was inferred
from the digest found in the file and handed to the hasher unchecked. A
digest longer than the 64 bytes BLAKE2b maximum made blake2b_simd fail
its own length assertion and abort the process, instead of the line
being reported as malformed.
Route that inferred length through parse_blake_length, like the --length
and tagged-line paths already do, and treat a rejected length as an
improperly formatted line. This matches GNU, which skips such a line and
exits 1 with "no properly formatted checksum lines found".
HashLength::from_bytes loses its last caller with this change, so drop
it.
Fixes #144871 parent 319f49f commit ebcdac1
3 files changed
Lines changed: 20 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
791 | 791 | | |
792 | 792 | | |
793 | 793 | | |
794 | | - | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
795 | 800 | | |
796 | 801 | | |
797 | 802 | | |
| |||

0 commit comments