Skip to content

Commit

Permalink
Address GH code scanning (#773)
Browse files Browse the repository at this point in the history
https://github.com/PeerDB-io/peerdb/security/code-scanning/3

GH doesn't like converting Itoa result to smaller integer
Ports are 16 bit unsigned integers, so parse as 16 bit unsigned integer
  • Loading branch information
serprex authored Dec 8, 2023
1 parent 62137f8 commit 4d84a38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flow/e2e/sqlserver/sqlserver_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type SQLServerHelper struct {
}

func NewSQLServerHelper(name string) (*SQLServerHelper, error) {
port, err := strconv.Atoi(os.Getenv("SQLSERVER_PORT"))
port, err := strconv.ParseUint(os.Getenv("SQLSERVER_PORT"), 10, 16)
if err != nil {
return nil, fmt.Errorf("invalid SQLSERVER_PORT: %s", os.Getenv("SQLSERVER_PORT"))
}
Expand Down

0 comments on commit 4d84a38

Please sign in to comment.