diff options
| author | Ben Noordhuis <info@bnoordhuis.nl> | 2011-09-16 19:16:30 +0200 |
|---|---|---|
| committer | Ben Noordhuis <info@bnoordhuis.nl> | 2011-09-22 06:16:34 +0200 |
| commit | 9ef962f9ee82f1d0610795f8ed28d82f2f6d04fc (patch) | |
| tree | 39ca809237f97cfdd1a54a85bbd539f42577d4c9 | |
| parent | 97d355c273583ec6226ab3f4f49bc909164bf801 (diff) | |
| download | node-9ef962f9ee82f1d0610795f8ed28d82f2f6d04fc.tar.gz | |
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.
| -rw-r--r-- | src/node_crypto.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_crypto.cc b/src/node_crypto.cc index a908f526b..a7c48da3b 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -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))); } |
