mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
crypto: fix error message buffer overrun
ERR_error_string() expects a buffer of at least 256 bytes, the input buffer was not even half that size. Use ERR_error_string_n() instead.
This commit is contained in:
1 parent
97d355c273
commit
9ef962f9ee
1 file changed
+1
-1
+1
-1
@@ -316,7 +316,7 @@ Handle<Value> SecureContext::SetCert(const Arguments& args) {
|
||||
String::New("SSL_CTX_use_certificate_chain")));
|
||||
}
|
||||
char string[120];
|
||||
ERR_error_string(err, string);
|
||||
ERR_error_string_n(err, string, sizeof string);
|
||||
return ThrowException(Exception::Error(String::New(string)));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user