authority/provisioners: fix overflow on 32-bit systems

In Go, len returns signed ints, not unsigned ints; consequently, this code
comparison overflows on 32-bit systems, like ARM.
This commit is contained in:
Derrick Lyndon Pallas 2019-01-28 00:54:15 +00:00
parent 88a3c4cf83
commit 7a5c4a1112

View file

@ -49,7 +49,7 @@ type uidProvisioner struct {
}
func newSortedProvisioners(provisioners []*Provisioner) (provisionerSlice, error) {
if len(provisioners) > math.MaxUint32 {
if len(provisioners) > math.MaxInt32 {
return nil, errors.New("too many provisioners")
}