Skip to content

Commit 99ef7a8

Browse files
committed
blossom: fix wrong source length in hex decode of download hash.
1 parent a152d7f commit 99ef7a8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

blossom.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,11 @@ var blossomCmd = &cli.Command{
154154
var hash [32]byte
155155
for i, hhash := range c.Args().Slice() {
156156
if len(hhash) != 64 {
157-
log("invalid blob hash '%s': %s\n", hhash, err)
157+
log("invalid blob hash '%s'\n", hhash)
158158
hasError = true
159159
continue
160160
}
161-
if _, err := hex.Decode(hash[:], unsafe.Slice(unsafe.StringData(hhash), 32)); err != nil {
161+
if _, err := hex.Decode(hash[:], unsafe.Slice(unsafe.StringData(hhash), 64)); err != nil {
162162
log("invalid blob hash '%s': %s\n", hhash, err)
163163
hasError = true
164164
continue

0 commit comments

Comments
 (0)