diff options
author | Trevor Norris <trev.norris@gmail.com> | 2015-06-02 13:10:47 -0600 |
---|---|---|
committer | Rod Vagg <rod@vagg.org> | 2015-08-04 11:56:11 -0700 |
commit | 944f68046c028484f3f5e741d63f85d65e08090c (patch) | |
tree | dac28421b611343a143f924d1886d012819ee209 /test | |
parent | 866408416612399ba96db87c638b473bb56ceb64 (diff) | |
download | android-node-v8-944f68046c028484f3f5e741d63f85d65e08090c.tar.gz android-node-v8-944f68046c028484f3f5e741d63f85d65e08090c.tar.bz2 android-node-v8-944f68046c028484f3f5e741d63f85d65e08090c.zip |
crypto: remove kMaxLength on randomBytes()
New Buffer implementation allows greater than kMaxLength to be created.
So instead check if the passed value is a valid Smi.
PR-URL: https://github.com/nodejs/io.js/pull/1825
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-crypto-random.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-crypto-random.js b/test/parallel/test-crypto-random.js index 3454796a6b..2d28cccc4c 100644 --- a/test/parallel/test-crypto-random.js +++ b/test/parallel/test-crypto-random.js @@ -53,5 +53,5 @@ function checkCall(cb, desc) { // #5126, "FATAL ERROR: v8::Object::SetIndexedPropertiesToExternalArrayData() // length exceeds max acceptable value" assert.throws(function() { - crypto.randomBytes(0x3fffffff + 1); + crypto.randomBytes((-1 >>> 0) + 1); }, TypeError); |