Chromium Code Reviews| Index: net/base/upload_data_stream.cc |
| diff --git a/net/base/upload_data_stream.cc b/net/base/upload_data_stream.cc |
| index 9f7bdbb419a28d63610b9235c0d5fcd9a6b5952e..125eab4500d0416b44a932351dc0efe7f0872ed2 100644 |
| --- a/net/base/upload_data_stream.cc |
| +++ b/net/base/upload_data_stream.cc |
| @@ -69,8 +69,10 @@ int UploadDataStream::FillBuf() { |
| size_t bytes_copied = std::min(count, size_remaining); |
| - memcpy(buf_->data() + buf_len_, &d[next_element_offset_], bytes_copied); |
| - buf_len_ += bytes_copied; |
| + if (bytes_copied) { |
|
willchan no longer on Chromium
2011/02/24 19:41:34
Please add a comment for why we need this conditio
|
| + memcpy(buf_->data() + buf_len_, &d[next_element_offset_], bytes_copied); |
| + buf_len_ += bytes_copied; |
| + } |
| if (bytes_copied == count) { |
| advance_to_next_element = true; |