From: Matt Joiner Date: Sun, 29 Sep 2013 06:43:35 +0000 (+1000) Subject: BytesInfoHash wasn't actually initializing the info hash X-Git-Tag: v1.0.0~1813 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=fe80bf2f2f3b2547005174ee8416eec1100b47eb;p=btrtrc.git BytesInfoHash wasn't actually initializing the info hash --- diff --git a/client.go b/client.go index a787fd9f..95dc790a 100644 --- a/client.go +++ b/client.go @@ -29,7 +29,7 @@ func copyHashSum(dst, src []byte) { } func BytesInfoHash(b []byte) (ih InfoHash) { - if len(b) != len(ih) { + if len(b) != len(ih) || copy(ih[:], b) != len(ih) { panic("bad infohash bytes") } return