We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3cf6a7b commit 041bb29Copy full SHA for 041bb29
src/crypto/crypto_dh.cc
@@ -578,13 +578,16 @@ Local<Value> StatelessDiffieHellman(
578
&out_size))
579
return Undefined(env->isolate());
580
581
+ void* hint = reinterpret_cast<void*>(static_cast<uintptr_t>(out_size));
582
return Buffer::New(env,
583
buf,
584
out_size,
585
[](char* data, void* hint) {
- OPENSSL_free(data);
586
+ size_t out_size = static_cast<size_t>(
587
+ reinterpret_cast<uintptr_t>(hint));
588
+ OPENSSL_clear_free(data, out_size);
589
},
- nullptr).FromMaybe(Local<Object>());
590
+ hint).FromMaybe(Local<Object>());
591
}
592
593
// The version of StatelessDiffieHellman that returns a Buffer
0 commit comments