crypto: remove kMaxLength on randomBytes() · nodejs/node@d4ee390 · GitHub
Skip to content

Commit d4ee390

Browse files
trevnorrisrvagg
authored andcommitted
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: #1825 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent 54e9a0b commit d4ee390

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

src/node_crypto.cc

Lines changed: 7 additions & 3 deletions

test/parallel/test-crypto-random.js

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)