From 693401d0ddd752e5fa47b882e56e252c42c94c0e Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Tue, 2 Apr 2019 00:01:29 +0200 Subject: buffer: use stricter range checks This validates the input to make sure the arguments do not overflow. Before, if the input would overflow, it would cause the write to be performt in the wrong spot / result in unexpected behavior. Instead, just use a strict number validation. PR-URL: https://github.com/nodejs/node/pull/27045 Fixes: https://github.com/nodejs/node/issues/27043 Reviewed-By: Matteo Collina Reviewed-By: Rich Trott --- lib/internal/errors.js | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/internal/errors.js') diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 6334626d3c..bc3f43653a 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -994,7 +994,6 @@ E('ERR_NO_CRYPTO', 'Node.js is not compiled with OpenSSL crypto support', Error); E('ERR_NO_ICU', '%s is not supported on Node.js compiled without ICU', TypeError); -E('ERR_NO_LONGER_SUPPORTED', '%s is no longer supported', Error); E('ERR_OUT_OF_RANGE', (str, range, input, replaceDefaultBoolean = false) => { assert(range, 'Missing "range" argument'); -- cgit v1.2.3