mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
dns: correct a length mistake
This commit is contained in:
1 parent
1b4489cd67
commit
7367e41cd1
1 file changed
+1
-1
+1
-1
@@ -382,7 +382,7 @@ func (m *Message) UnmarshalRR(start int, rr *RR) (n int, err error) {
|
||||
rr.TTL = binary.BigEndian.Uint32(p[n+4:])
|
||||
rr.RDLENGTH = binary.BigEndian.Uint16(p[n+8:])
|
||||
|
||||
if len(p) <= n+10+int(rr.RDLENGTH) {
|
||||
if len(p) < n+10+int(rr.RDLENGTH) {
|
||||
return 0, errors.New("UnmarshalRR: not enough data for RDATA")
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user