don't pass too much data

This commit is contained in:
AJ ONeal 2017-02-02 19:44:18 -07:00
parent 75a03ad902
commit 5e125c9a31
1 changed files with 4 additions and 2 deletions

View File

@ -39,8 +39,10 @@ exports.DNS_RDATA_PARSE = function (ab, packet, record) {
// NOTE: record will be modified
// Things that get added include:
// address, data, priority exchange, weight,
return parser(ab, packet, record);
// address, data, priority exchange, weight,
// NOTE: this slicing is a shim so that we don't have to pass rdend to unpackLabel
// (because `undefined` and 0x00 are functionally equivalent)
return parser(ab.slice(0, record.rdstart + record.rdlength), packet, record);
};
}('undefined' !== typeof window ? window : exports));