Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SriHarsha001 committed Nov 8, 2023
1 parent 3cece45 commit c96f858
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ func (dns *Msg) unpack(dh Header, msg []byte, off int) (err error) {
if err == nil {
dns.Extra, _, err = unpackRRslice(int(dh.Arcount), msg, off)
}
if err == nil && int(dh.Arcount) > len(dns.Extra) {
if err == nil && int(dh.Arcount) != len(dns.Extra) {
return ErrBuf
}
// The header counts might have been wrong so we need to update it
Expand Down

0 comments on commit c96f858

Please sign in to comment.