Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit63f9ef2

Browse files
authored
chore: fix minor int coercion codeql vulnerability (#7024)
1 parentc18ed61 commit63f9ef2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎cli/agent.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,8 @@ func urlPort(u string) (int, error) {
336336
return-1,xerrors.Errorf("invalid url %q: %w",u,err)
337337
}
338338
ifparsed.Port()!="" {
339-
port,err:=strconv.ParseInt(parsed.Port(),10,64)
340-
iferr==nil&&port>0 {
339+
port,err:=strconv.ParseUint(parsed.Port(),10,16)
340+
iferr==nil&&port>0&&port<1<<16{
341341
returnint(port),nil
342342
}
343343
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp