Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tls.js')
-rw-r--r--lib/tls.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tls.js b/lib/tls.js
index 765e1658ea9..131c7c89244 100644
--- a/lib/tls.js
+++ b/lib/tls.js
@@ -29,7 +29,7 @@ exports.getCiphers = internalUtil.cachedResult(() => {
// Convert protocols array into valid OpenSSL protocols list
// ("\x06spdy/2\x08http/1.1\x08http/1.0")
function convertProtocols(protocols) {
- const lens = Array(protocols.length);
+ const lens = new Array(protocols.length);
const buff = Buffer.allocUnsafe(protocols.reduce((p, c, i) => {
var len = Buffer.byteLength(c);
lens[i] = len;