Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
node_crypto: Use math.h definitions of isnan and isinf
Unless you specify C++11, std::isnan and std::isinf are not guaranteed to be available. Instead, just use the math.h functions for now.
  • Loading branch information
jer-gentoo authored Mar 7, 2018
commit 65172e1759d977ec566a37ce0fab1014493425d3
2 changes: 1 addition & 1 deletion src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5623,7 +5623,7 @@ void PBKDF2(const FunctionCallbackInfo<Value>& args) {
}

raw_keylen = args[3]->NumberValue();
if (raw_keylen < 0.0 || std::isnan(raw_keylen) || std::isinf(raw_keylen) ||
if (raw_keylen < 0.0 || isnan(raw_keylen) || isinf(raw_keylen) ||
raw_keylen > INT_MAX) {
type_error = "Bad key length";
goto err;
Expand Down