Skip to content

Commit

Permalink
Remove null characters from seed when reading (#3300) (#5976)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Mar 25, 2020
1 parent b7d80d5 commit ce3e6f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/3300.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
2 changes: 2 additions & 0 deletions google/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ func readSeedFromFile(fileName string) (int64, error) {
if err != nil {
return 0, err
}
// Remove NULL characters from seed
data = bytes.Trim(data, "\x00")
seed := string(data)
return strconv.ParseInt(seed, 10, 64)
}
Expand Down

0 comments on commit ce3e6f2

Please sign in to comment.