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:
4536b27
)
crypto: ensure that read head is always non-empty
author
Fedor Indutny
<fedor.indutny@gmail.com>
Tue, 11 Jun 2013 14:11:48 +0000
(16:11 +0200)
committer
Fedor Indutny
<fedor.indutny@gmail.com>
Sat, 15 Jun 2013 19:43:24 +0000
(21:43 +0200)
src/node_crypto_bio.cc
patch
|
blob
|
history
diff --git
a/src/node_crypto_bio.cc
b/src/node_crypto_bio.cc
index
9d566fd
..
547c711
100644
(file)
--- a/
src/node_crypto_bio.cc
+++ b/
src/node_crypto_bio.cc
@@
-203,8
+203,10
@@
size_t NodeBIO::Read(char* out, size_t size) {
read_head_->write_pos_ = 0;
// But not get beyond write_head_
- if (bytes_read != expected)
+ if (length_ != bytes_read) {
+ assert(read_head_ != write_head_);
read_head_ = read_head_->next_;
+ }
}
}
assert(expected == bytes_read);