forked from TrueCloudLab/certificates
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:
parent
88a3c4cf83
commit
7a5c4a1112
1 changed files with 1 additions and 1 deletions
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue