Skip to content

Commit e03a0d4

Browse files
authored
Merge pull request #547 from igorklopov/master
`packet.skip(23);` means 23 unsafe bytes leak over wire
2 parents 4993052 + 32abed2 commit e03a0d4

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)