projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d0b1ed
)
crypto: fix error message buffer overrun
author
Ben Noordhuis
<info@bnoordhuis.nl>
Fri, 16 Sep 2011 17:16:30 +0000
(19:16 +0200)
committer
Ben Noordhuis
<info@bnoordhuis.nl>
Fri, 16 Sep 2011 17:16:32 +0000
(19:16 +0200)
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.
src/node_crypto.cc
patch
|
blob
|
history
diff --git
a/src/node_crypto.cc
b/src/node_crypto.cc
index 5c049bd8305c066d82ecd6567813b278571961b2..bebcbd12c3b2a51387234887d9f64dd01f5a4d10 100644
(file)
--- a/
src/node_crypto.cc
+++ b/
src/node_crypto.cc
@@
-333,7
+333,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)));
}