Browse Source

crypto: change assertion to condition in bio

Read head can be the same as write head, even if there's some data to
read.
v0.11.3-release
Fedor Indutny 12 years ago
parent
commit
bf8dc0762a
  1. 3
      src/node_crypto_bio.cc

3
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_
if (length_ != bytes_read) {
assert(read_head_ != write_head_);
if (length_ != bytes_read && read_head_ != write_head_) {
read_head_ = read_head_->next_;
}
}

Loading…
Cancel
Save