Chromium Code Reviews
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 : #
Messages
Total messages: 11 (5 generated)
|
|||||||||||||||||||||||||||||||||||||