From e39e518b54f83c5dcc322523d347b70f76402793 Mon Sep 17 00:00:00 2001 From: Jesse Tane Date: Thu, 18 Dec 2014 00:50:17 -0500 Subject: [PATCH] fix broken max-length check --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 2637df0..baeb4ff 100644 --- a/index.js +++ b/index.js @@ -85,7 +85,7 @@ function Buffer (subject, encoding, noZero) { } else throw new TypeError('must start with number, buffer, array or string') - if (this.length > kMaxLength) + if (length > kMaxLength) throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength.toString(16) + ' bytes') -- 2.34.1