Skip to content

Commit 6a29630

Browse files
BufoViridisBridgeAR
authored andcommitted
src: fix crypto.pbkdf2 callback error argument
Callbacks should always return `null` instead of `undefined` if no error occurred. PR-URL: nodejs#18458 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 075eef5 commit 6a29630

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node_crypto.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -4943,7 +4943,7 @@ void PBKDF2Request::Work(uv_work_t* work_req) {
49434943

49444944
void PBKDF2Request::After(Local<Value> (*argv)[2]) {
49454945
if (success_) {
4946-
(*argv)[0] = Undefined(env()->isolate());
4946+
(*argv)[0] = Null(env()->isolate());
49474947
(*argv)[1] = Buffer::New(env(), key_, keylen_).ToLocalChecked();
49484948
key_ = nullptr;
49494949
keylen_ = 0;

0 commit comments

Comments
 (0)