Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Issue 11231068: drive: Fix a crash in gdata::DriveUploader::ResumeUpload() (Closed)

Created:
8 years, 2 months ago by satorux1
Modified:
8 years, 2 months ago
Reviewers:
achuithb, kinaba
CC:
chromium-reviews, oshima+watch_chromium.org, stevenjb+watch_chromium.org, nkostylev+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

drive: 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -4 lines) Patch
M chrome/browser/chromeos/drive/drive_uploader.cc View 1 2 1 chunk +9 lines, -4 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
satorux1
8 years, 2 months ago (2012-10-23 06:58:22 UTC) #1
kinaba
8 years, 2 months ago (2012-10-23 07:11:53 UTC) #2
lgtm

Powered by Google App Engine
This is Rietveld 408576698