Skip to content

Commit 05c6f18

Browse files
committed
lint: replace math/rand.Read with crypto/rand.Read
1 parent 2df67b4 commit 05c6f18

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

v2_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package proxyproto
33
import (
44
"bufio"
55
"bytes"
6+
iorand "crypto/rand"
67
"encoding/binary"
78
"math/rand"
89
"reflect"
@@ -51,7 +52,7 @@ var (
5152
fixtureUnixV2 = append(lengthUnixBytes, fixtureUnixAddress...)
5253
fixtureTLV = func() []byte {
5354
tlv := make([]byte, 2+rand.Intn(1<<12)) // Not enough to overflow, at least size two
54-
rand.Read(tlv)
55+
_, _ = iorand.Read(tlv)
5556
return tlv
5657
}()
5758
fixtureIPv4V2TLV = fixtureWithTLV(lengthV4Bytes, fixtureIPv4Address, fixtureTLV)

0 commit comments

Comments
 (0)