From 89a6adb8f80456dea06394d9a9292367aea9898a Mon Sep 17 00:00:00 2001 From: "kinuko@chromium.org" Date: Tue, 8 Mar 2011 03:08:31 +0000 Subject: Fixed the bug 75018: incorrect conditional jump in fileapi::FileSystemUsageCache::Read. BUG=75018 TEST=none Review URL: http://codereview.chromium.org/6621061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77239 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/fileapi/file_system_usage_cache.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'webkit/fileapi') diff --git a/webkit/fileapi/file_system_usage_cache.cc b/webkit/fileapi/file_system_usage_cache.cc index 05fbea6..24b3c26 100644 --- a/webkit/fileapi/file_system_usage_cache.cc +++ b/webkit/fileapi/file_system_usage_cache.cc @@ -75,7 +75,9 @@ int64 FileSystemUsageCache::Read(const FilePath& usage_file_path, uint32* dirty) { char buffer[kUsageFileSize]; const char *header; - file_util::ReadFile(usage_file_path, buffer, kUsageFileSize); + if (kUsageFileSize != + file_util::ReadFile(usage_file_path, buffer, kUsageFileSize)) + return -1; Pickle read_pickle(buffer, kUsageFileSize); void* iter = NULL; int64 fs_usage; -- cgit v1.1