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

@ -40,7 +40,9 @@ exports.DNS_RDATA_PARSE = function (ab, packet, record) {
// NOTE: record will be modified // NOTE: record will be modified
// Things that get added include: // Things that get added include:
// address, data, priority exchange, weight, // address, data, priority exchange, weight,
return parser(ab, packet, record); // 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)); }('undefined' !== typeof window ? window : exports));