projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b685de1
)
re PR go/52341 (crypto/rand FAILs before Solaris 11)
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Wed, 25 Apr 2012 04:40:49 +0000
(
04:40
+0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Wed, 25 Apr 2012 04:40:49 +0000
(
04:40
+0000)
PR go/52341
crypto/rand: Use io.ReadFull when reading from /dev/urandom.
From-SVN: r186803
libgo/go/crypto/rand/rand_test.go
patch
|
blob
|
history
diff --git
a/libgo/go/crypto/rand/rand_test.go
b/libgo/go/crypto/rand/rand_test.go
index be3a5a221d7d8e61ed5ca39f754265d79885ad16..da091ba8c73ade461c2547342ef089de1a6a0a66 100644
(file)
--- a/
libgo/go/crypto/rand/rand_test.go
+++ b/
libgo/go/crypto/rand/rand_test.go
@@
-7,6
+7,7
@@
package rand
import (
"bytes"
"compress/flate"
+ "io"
"testing"
)
@@
-16,9
+17,9
@@
func TestRead(t *testing.T) {
n = 1e5
}
b := make([]byte, n)
- n, err :=
Read(
b)
+ n, err :=
io.ReadFull(Reader,
b)
if n != len(b) || err != nil {
- t.Fatalf("Read(buf) = %d, %s", n, err)
+ t.Fatalf("Read
Full
(buf) = %d, %s", n, err)
}
var z bytes.Buffer