Random number generator is not seeded, leading to known paths
Bug #1297690 reported by
Adam Collard
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gocheck |
New
|
Undecided
|
Unassigned |
Bug Description
gocheck uses temporary directories to run tests in, but these temporary directories are made with known, predictable names.
We can see here
http://
that newPath uses rand.Int() without first seeding the RNG. Meaning I'll always have tests run in /tmp/gocheck-
I don't think cryptographically secure random numbers are needed so something as simple as rand.Seed(
tags: | added: landscape |
To post a comment you must log in.
Our CI is hitting this more frequently. We get directory name collisions in /tmp.