Skip to content

Commit

Permalink
fix: Patch potential nil pointer deference in proxy::http::client::fi…
Browse files Browse the repository at this point in the history
…llRequestHeader().
  • Loading branch information
cty123 authored and yuhan6665 committed Jul 16, 2023
1 parent 929f286 commit 8eb3cfe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions proxy/http/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ func fillRequestHeader(ctx context.Context, header []*Header) ([]*Header, error)
inbound := session.InboundFromContext(ctx)
outbound := session.OutboundFromContext(ctx)

if inbound == nil || outbound == nil {
return nil, newError("missing inbound or outbound metadata from context")
}

data := struct {
Source net.Destination
Target net.Destination
Expand Down

0 comments on commit 8eb3cfe

Please sign in to comment.