x/net/ipv4: missing error handling in the Header.Marshal method #36525
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
In the ipv4.Header.Marshal method, the code does not handle the possible error returned by h.Src.To4(). On the other hand, the possible error returned by h.Dst.To4() is handled correctly.
Another small issue is that the slice returned by To4() is still sliced (
ip[:net.IPv4len]
); this is unnecessary.See https://github.com/golang/net/blob/master/ipv4/header.go#L92
The text was updated successfully, but these errors were encountered: