]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/rand: apply the same max read size on Illumos as on Solaris
authorBryan C. Mills <bcmills@google.com>
Wed, 20 Apr 2022 15:17:59 +0000 (11:17 -0400)
committerGopher Robot <gobot@golang.org>
Wed, 20 Apr 2022 16:05:16 +0000 (16:05 +0000)
This case was missed in CL 370894, and masked by the lack of an
Illumos TryBot.

Fixes #52452.

Change-Id: I7cda193e33c11a9d04eb888fdb5ec9218e6ed1b5
Reviewed-on: https://go-review.googlesource.com/c/go/+/401294
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <valsorda@google.com>
src/crypto/rand/rand_getrandom.go

index cb31a5687a5266e859ebff8d3cf97146b11020a1..478aa5c459860cc42c14734975c062bc69015068 100644 (file)
@@ -21,7 +21,7 @@ func init() {
                //     is returned by a single call to getrandom() on systems where int
                //     has a size of 32 bits.
                maxGetRandomRead = (1 << 25) - 1
-       case "freebsd", "dragonfly", "solaris":
+       case "freebsd", "dragonfly", "solaris", "illumos":
                maxGetRandomRead = 1 << 8
        default:
                panic("no maximum specified for GetRandom")