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:
78d245f
)
crypto: fix CipherFinal return value check
author
Brian White
<mscdex@mscdex.net>
Mon, 3 Mar 2014 05:25:11 +0000
(
00:25
-0500)
committer
Fedor Indutny
<fedor.indutny@gmail.com>
Tue, 4 Mar 2014 08:42:03 +0000
(12:42 +0400)
src/node_crypto.cc
patch
|
blob
|
history
diff --git
a/src/node_crypto.cc
b/src/node_crypto.cc
index
0991f54
..
3f7a7d1
100644
(file)
--- a/
src/node_crypto.cc
+++ b/
src/node_crypto.cc
@@
-2478,7
+2478,7
@@
bool CipherBase::Final(unsigned char** out, int *out_len) {
return false;
*out = new unsigned char[EVP_CIPHER_CTX_block_size(&ctx_)];
-
bool
r = EVP_CipherFinal_ex(&ctx_, *out, out_len);
+
int
r = EVP_CipherFinal_ex(&ctx_, *out, out_len);
if (r && kind_ == kCipher) {
delete[] auth_tag_;
@@
-2497,7
+2497,7
@@
bool CipherBase::Final(unsigned char** out, int *out_len) {
EVP_CIPHER_CTX_cleanup(&ctx_);
initialised_ = false;
- return r;
+ return r
== 1
;
}