Skip to content

Commit

Permalink
Fix crash when info is null
Browse files Browse the repository at this point in the history
  • Loading branch information
pufferffish committed Apr 13, 2024
1 parent 1e0391c commit f54319b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/wireproxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func extractPort(addr string) uint16 {

func lockNetwork(sections []wireproxy.RoutineSpawner, infoAddr *string) {
var rules []landlock.Rule
if infoAddr != nil {
if infoAddr != nil && *infoAddr != "" {
rules = append(rules, landlock.BindTCP(extractPort(*infoAddr)))
}

Expand Down

0 comments on commit f54319b

Please sign in to comment.