Change EDNS parsing code to use rdlength more cautiously.

It shouldn't ever be negative, but if it were, using it to modify the
data pointer/length isn't appropriate.
This commit is contained in:
Jon Siwek 2014-09-02 16:22:15 -05:00
parent d57b161c40
commit 782b4d0eae

View file

@ -692,11 +692,6 @@ int DNS_Interpreter::ParseRR_EDNS(DNS_MsgInfo* msg,
data += rdlength; data += rdlength;
len -= rdlength; len -= rdlength;
} }
else
{ // no data, move on
data += rdlength;
len -= rdlength;
}
return 1; return 1;
} }