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:
7373c4d
)
crypto: change assertion to condition in bio
author
Fedor Indutny
<fedor.indutny@gmail.com>
Wed, 19 Jun 2013 08:16:59 +0000
(10:16 +0200)
committer
Fedor Indutny
<fedor.indutny@gmail.com>
Wed, 19 Jun 2013 20:03:07 +0000
(22:03 +0200)
Read head can be the same as write head, even if there's some data to
read.
src/node_crypto_bio.cc
patch
|
blob
|
history
diff --git
a/src/node_crypto_bio.cc
b/src/node_crypto_bio.cc
index
adb1e33
..
9afaa3d
100644
(file)
--- a/
src/node_crypto_bio.cc
+++ b/
src/node_crypto_bio.cc
@@
-209,8
+209,7
@@
size_t NodeBIO::Read(char* out, size_t size) {
read_head_->write_pos_ = 0;
// But not get beyond write_head_
read_head_->write_pos_ = 0;
// But not get beyond write_head_
- if (length_ != bytes_read) {
- assert(read_head_ != write_head_);
+ if (length_ != bytes_read && read_head_ != write_head_) {
read_head_ = read_head_->next_;
}
}
read_head_ = read_head_->next_;
}
}