[FileAPI] Ensure we're not trying to create blob with bogus data.
The file system provider API passed metadata back from the extensions without any kind of sanitization. This means that for example "valid" blobs with negative sizes could exist. We don't want to have to deal with these weird beasts on the blob size, so add some assertions to the blob code to make sure this doesn't happen, and sanitize negative sizes on the file system provider side before passing them back. This is part of a series of changes to improve consistency surrounding how snapshot state of files/blobs is implemented. Bug: 844874 Change-Id: Ie3dd1de9d49b071b615e969ec68529bf3074c875 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1976431Reviewed-by:Daniel Murphy <dmurph@chromium.org> Reviewed-by:
Naoki Fukino <fukino@chromium.org> Reviewed-by:
Jeremy Roman <jbroman@chromium.org> Commit-Queue: Marijn Kruisselbrink <mek@chromium.org> Cr-Commit-Position: refs/heads/master@{#728006}
Showing
Please register or sign in to comment