From 338a81741a9aecba1a80014eced5cb2d3852d8eb Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Wed, 20 Apr 2022 11:17:59 -0400 Subject: [PATCH] crypto/rand: apply the same max read size on Illumos as on Solaris 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 Auto-Submit: Bryan Mills TryBot-Result: Gopher Robot Reviewed-by: Filippo Valsorda --- src/crypto/rand/rand_getrandom.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/rand/rand_getrandom.go b/src/crypto/rand/rand_getrandom.go index cb31a5687a..478aa5c459 100644 --- a/src/crypto/rand/rand_getrandom.go +++ b/src/crypto/rand/rand_getrandom.go @@ -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") -- 2.48.1