From e66ead8d86508f6a858c505c3e75e233828acef7 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 28 Oct 2015 20:11:36 +0100 Subject: [PATCH] crypto/ecies: fix build on 32bit --- crypto/ecies/ecies.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/ecies/ecies.go b/crypto/ecies/ecies.go index 2c4dc70a4c..1ef46b4484 100644 --- a/crypto/ecies/ecies.go +++ b/crypto/ecies/ecies.go @@ -152,7 +152,7 @@ var ( func ConcatKDF(hash hash.Hash, z, s1 []byte, kdlen int) ([]byte, error) { hashlen := hash.Size() reps := (kdlen + hashlen - 1) / hashlen - if reps > math.MaxUint32 { + if uint64(reps) > math.MaxUint32 { return nil, ErrKeyDataTooLong // prevent counter overflow } counter := []byte{0, 0, 0, 0}