Skip to content

Commit

Permalink
Clear ChunkedDataPipeUploadDataStream buffer length.
Browse files Browse the repository at this point in the history
When clearing ChunkedDataPipeUploadDataStream::buf_ also set
ChunkedDataPipeUploadDataStream::buf_len_ to zero as it signifies
the length of buf_ which is now gone.

Bug: None
Change-Id: I470b46fcb5cd0615e1841780e3c9744763c85265
Reviewed-on: https://chromium-review.googlesource.com/c/1333657
Reviewed-by: Ken Rockot <[email protected]>
Commit-Queue: Chris Mumford <[email protected]>
Cr-Commit-Position: refs/heads/master@{#607693}
  • Loading branch information
cmumford authored and Commit Bot committed Nov 13, 2018
1 parent ab0f182 commit 68d0b06
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions services/network/chunked_data_pipe_upload_data_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ void ChunkedDataPipeUploadDataStream::OnSizeReceived(int32_t status,
data_pipe_.reset();
// Clear |buf_| as well, so it's only non-null while there's a pending read.
buf_ = nullptr;
buf_len_ = 0;

OnReadCompleted(status_);

Expand Down

0 comments on commit 68d0b06

Please sign in to comment.