fix: ensure user agent is less than 0xfd in length. we can assume the varint is 1 byte.

This commit is contained in:
Christopher Jeffrey 2014-06-24 00:43:37 -05:00
parent cd58baed95
commit c6bafbcb48

View File

@ -14,7 +14,9 @@ function Framer(options) {
options = options || {};
this.options = options;
this.agent = utils.toArray(options.agent || '/bcoin:' + version + '/');
this.agent = this.agent.slice(0, 0xfc);
}
module.exports = Framer;