Descriptiondrive: Fix a crash in gdata::DriveUploader::ResumeUpload()
This is a reland of crrev.com/163511, which was reverted as "return"
statement was missing where it should not.
The crash reported at crbug.com/157057 can occur if the 2nd parameter to
std::string constructor is negative here:
bool ResumeUploadOperation::GetContentData(std::string* upload_content_type,
std::string* upload_content) {
*upload_content_type = params_.content_type;
*upload_content = std::string(params_.buf->data(),
params_.end_range - params_.start_range + 1);
return true;
}
Looking at the code, this can occur if reading of a file failed in
DriveUploader::ReadCompletionCallback().
BUG=157057
TEST=none. This crash is hard to reproduce
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=163745
Patch Set 1 #Patch Set 2 : fix #Patch Set 3 : rebase #Messages
Total messages: 2 (0 generated)
|