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:
62a2142
)
crypto: fix changing buffers in bio
author
Fedor Indutny
<fedor.indutny@gmail.com>
Sat, 6 Apr 2013 19:26:00 +0000
(23:26 +0400)
committer
Fedor Indutny
<fedor.indutny@gmail.com>
Wed, 10 Apr 2013 12:55:10 +0000
(16:55 +0400)
We should go to next buffer if *current* one is full, not the next one.
Otherwise we may hop through buffers and written data will become
interleaved, which will lead to failure.
src/node_crypto_bio.cc
patch
|
blob
|
history
diff --git
a/src/node_crypto_bio.cc
b/src/node_crypto_bio.cc
index
d17ee21
..
d69eeb8
100644
(file)
--- a/
src/node_crypto_bio.cc
+++ b/
src/node_crypto_bio.cc
@@
-279,7
+279,7
@@
void NodeBIO::Write(const char* data, size_t size) {
// Go to next buffer if there still are some bytes to write
if (left != 0) {
- if (write_head_->
next_->
write_pos_ == kBufferLength) {
+ if (write_head_->write_pos_ == kBufferLength) {
Buffer* next = new Buffer();
next->next_ = write_head_->next_;
write_head_->next_ = next;