From a25ed5ba1b0124f82f77b722cf3225cf4b3f18f5 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Thu, 21 Dec 2017 10:02:25 -0500 Subject: [PATCH] cmn: fix race condition in prng --- common/random.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/random.go b/common/random.go index 9df55ff81..ca71b6143 100644 --- a/common/random.go +++ b/common/random.go @@ -40,7 +40,7 @@ func RandStr(length int) string { chars := []byte{} MAIN_LOOP: for { - val := prng.Int63() + val := RandInt63() for i := 0; i < 10; i++ { v := int(val & 0x3f) // rightmost 6 bits if v >= 62 { // only 62 characters in strChars