Skip to content

Commit 32abed2

Browse files
committed
packet.skip(23); means 23 unsafe bytes leak over wire
you may discard if not that important :)
1 parent 4993052 commit 32abed2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/packets/handshake_response.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ HandshakeResponse.prototype.toPacket = function ()
132132
}
133133
// dry run: calculate resulting packet length
134134
var p = this.serializeResponse(Packet.MockBuffer());
135-
return this.serializeResponse(Buffer.allocUnsafe(p.offset));
135+
return this.serializeResponse(Buffer.alloc(p.offset));
136136
};
137137

138138
module.exports = HandshakeResponse;

0 commit comments

Comments
 (0)