QDnsLookup/Unix: fix off-by-one error in parsing the reply
Found this when the DNS server replied with no errors, no answers, and
no EDNS0 tail.
Amends eb51454b90
Pick-to: 6.7
Change-Id: Ie30a3caf09ef4176bb36fffd17cdf0916ac31545
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
bb10
parent
1961d42a3d
commit
e3f520e621
|
|
@ -310,7 +310,7 @@ void QDnsLookupRunnable::query(QDnsLookupReply *reply)
|
|||
expandHost(offset);
|
||||
if (status < 0)
|
||||
return;
|
||||
if (offset + status + 4 >= responseLength)
|
||||
if (offset + status + 4 > responseLength)
|
||||
header->qdcount = 0xffff; // invalid reply below
|
||||
else
|
||||
offset += status + 4;
|
||||
|
|
|
|||
Loading…
Reference in New Issue