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

Issue 1887873002: [Downloads] BaseFile shouldn't read past the expected EOF for a stub file. (Closed)

Created:
4 years, 8 months ago by asanka
Modified:
4 years, 8 months ago
Reviewers:
svaldez
CC:
asanka, chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Downloads] BaseFile shouldn't read past the expected EOF for a stub file. The partial stub file may have more data than expected due to discrepancy between persisted metadata and the intermediate file. Currently we resolve this conflict in favor of persisted metadata and truncate the partial file to match. In this case, BaseFile::Initialize() -> BaseFile::CalculatePartialHash() ended up reading past teh expected EOF for large intermediate files. Consequently, BaseFile would conclude incorrectly that the partial file is too short. This patch fixes this bug by correctly stopping reading prior to the expected EOF. R=svaldez@chromium.org BUG=603330 Committed: https://crrev.com/aeeba88e199ca02307bf5dfb651c867cfdb94a16 Cr-Commit-Position: refs/heads/master@{#387370}

Patch Set 1 #

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -11 lines) Patch
M content/browser/download/base_file.cc View 1 chunk +9 lines, -3 lines 0 comments Download
M content/browser/download/base_file_unittest.cc View 9 chunks +46 lines, -8 lines 0 comments Download
M content/browser/download/download_browsertest.cc View 1 1 chunk +68 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (5 generated)
asanka
4 years, 8 months ago (2016-04-13 23:35:50 UTC) #1
svaldez
lgtm
4 years, 8 months ago (2016-04-14 14:41:30 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1887873002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1887873002/1
4 years, 8 months ago (2016-04-14 14:45:53 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1887873002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1887873002/20001
4 years, 8 months ago (2016-04-14 17:29:48 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 8 months ago (2016-04-14 18:17:39 UTC) #9
commit-bot: I haz the power
4 years, 8 months ago (2016-04-14 18:19:54 UTC) #11
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/aeeba88e199ca02307bf5dfb651c867cfdb94a16
Cr-Commit-Position: refs/heads/master@{#387370}

Powered by Google App Engine
This is Rietveld 408576698