firasuke / mussel

The shortest and fastest script to build working cross compilers targeting musl libc
ISC License
88 stars 12 forks source link

fix : b3sum checksum bug #18

Closed chidea closed 7 months ago

chidea commented 10 months ago

b3sum -c fails when there is only one space between checksum and filename.

firasuke commented 9 months ago

What version of b3sum are you using?

chidea commented 9 months ago

It's the latest stable v1.5.0 and the environment is Windows 11 Pro pwsh. Here's log.

> printf '02cdd6085789ac73e03705eea8cf8de66bac841726d392e2e0ab66561dfb1a7c  main.rs' | b3sum -c                                                      
main.rs: OK
> printf '02cdd6085789ac73e03705eea8cf8de66bac841726d392e2e0ab66561dfb1a7c main.rs' | b3sum -c
b3sum: Invalid space
b3sum: WARNING: 1 computed checksum did NOT match
> b3sum -V
b3sum 1.5.0
chidea commented 9 months ago

This line of code is the root of problem. https://github.com/BLAKE3-team/BLAKE3/blob/7ce2aa41e9f01a91c3b309a7bf5e86b4136ed8a9/b3sum/src/main.rs#L349

firasuke commented 7 months ago

@chidea is this still an issue after #22?

chidea commented 7 months ago

As long as it's merged to the main branch, I think the point has been made. Thanks for sharing a great project!

firasuke commented 7 months ago

Yeah, no worries. Glad you liked it!