summaryrefslogtreecommitdiff
path: root/src/node_crypto_bio.cc
diff options
context:
space:
mode:
authorFedor Indutny <fedor.indutny@gmail.com>2013-06-19 10:16:59 +0200
committerFedor Indutny <fedor.indutny@gmail.com>2013-06-19 22:03:07 +0200
commitbf8dc0762a365302f742da85fa416886332ab73d (patch)
tree14c57becf6aa0df636ddeadaacd02b78bef6c7a5 /src/node_crypto_bio.cc
parent7373c4ddb7143fb7da75feda39c70788fb1bcfc7 (diff)
downloadandroid-node-v8-bf8dc0762a365302f742da85fa416886332ab73d.tar.gz
android-node-v8-bf8dc0762a365302f742da85fa416886332ab73d.tar.bz2
android-node-v8-bf8dc0762a365302f742da85fa416886332ab73d.zip
crypto: change assertion to condition in bio
Read head can be the same as write head, even if there's some data to read.
Diffstat (limited to 'src/node_crypto_bio.cc')
-rw-r--r--src/node_crypto_bio.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/node_crypto_bio.cc b/src/node_crypto_bio.cc
index adb1e336e9..9afaa3d353 100644
--- 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_
- if (length_ != bytes_read) {
- assert(read_head_ != write_head_);
+ if (length_ != bytes_read && read_head_ != write_head_) {
read_head_ = read_head_->next_;
}
}