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:
16b0a33
)
crypto: unsigned value can't be negative
author
Brian White
<mscdex@mscdex.net>
Tue, 2 Sep 2014 13:27:33 +0000
(09:27 -0400)
committer
Fedor Indutny
<fedor@indutny.com>
Tue, 2 Sep 2014 13:41:30 +0000
(17:41 +0400)
Reviewed-By: Fedor Indutny <fedor@indutny.com>
src/node_crypto.cc
patch
|
blob
|
history
diff --git
a/src/node_crypto.cc
b/src/node_crypto.cc
index
329ca9c
..
1b72d72
100644
(file)
--- a/
src/node_crypto.cc
+++ b/
src/node_crypto.cc
@@
-3688,7
+3688,7
@@
void PublicKeyCipher::Cipher(const FunctionCallbackInfo<Value>& args) {
String::Utf8Value passphrase(args[3]);
unsigned char* out_value = NULL;
- size_t out_len =
-1
;
+ size_t out_len =
0
;
bool r = Cipher<operation, EVP_PKEY_cipher_init, EVP_PKEY_cipher>(
kbuf,
@@
-3700,7
+3700,7
@@
void PublicKeyCipher::Cipher(const FunctionCallbackInfo<Value>& args) {
&out_value,
&out_len);
- if (out_len
<
= 0 || !r) {
+ if (out_len
=
= 0 || !r) {
delete[] out_value;
out_value = NULL;
out_len = 0;