framer: fix array length, assuming user-agent is below 0xfd in length.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
This commit is contained in:
Christopher Jeffrey 2014-05-23 05:29:39 -05:00 committed by Fedor Indutny
parent 9981835df4
commit faca3454b2

View File

@ -59,7 +59,7 @@ Framer.prototype._addr = function addr(buf, off) {
};
Framer.prototype.version = function version(packet) {
var p = new Array(86);
var p = new Array(86 + this.agent.length);
var off = 0;
if (!packet)