summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-08 03:08:31 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-08 03:08:31 +0000
commit89a6adb8f80456dea06394d9a9292367aea9898a (patch)
tree4a13c3dda72f8bbe8e6afa4bc665f705cc015668
parentbcf3209e667e69fe3170c6682fbbc0121dd2f6b8 (diff)
downloadchromium_src-89a6adb8f80456dea06394d9a9292367aea9898a.zip
chromium_src-89a6adb8f80456dea06394d9a9292367aea9898a.tar.gz
chromium_src-89a6adb8f80456dea06394d9a9292367aea9898a.tar.bz2
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
-rw-r--r--tools/valgrind/memcheck/suppressions.txt28
-rw-r--r--webkit/fileapi/file_system_usage_cache.cc4
2 files changed, 3 insertions, 29 deletions
diff --git a/tools/valgrind/memcheck/suppressions.txt b/tools/valgrind/memcheck/suppressions.txt
index 432b43d..0d622e4 100644
--- a/tools/valgrind/memcheck/suppressions.txt
+++ b/tools/valgrind/memcheck/suppressions.txt
@@ -3816,34 +3816,6 @@
fun:_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc
}
{
- bug_75018_a
- Memcheck:Cond
- ...
- fun:_ZN6PickleC1EPKci
- fun:_ZN7fileapi20FileSystemUsageCache4ReadERK8FilePathPj
-}
-{
- bug_75018_b
- Memcheck:Cond
- fun:_ZNK6Pickle18IteratorHasRoomForEPKvi
- fun:_ZNK6Pickle9ReadBytesEPPvPPKci
- fun:_ZN7fileapi20FileSystemUsageCache4ReadERK8FilePathPj
- fun:_ZN7fileapi20FileSystemUsageCache8GetUsageERK8FilePath
- fun:_ZN7fileapi22FileSystemUsageTracker12GetUsageTask15RunOnFileThreadEv
- fun:_Z16DispatchToMethodIN7fileapi22FileSystemUsageTracker12GetUsageTaskEMS2_FvvEEvPT_T0_RK6Tuple0
- fun:_ZN14RunnableMethodIN7fileapi22FileSystemUsageTracker12GetUsageTaskEMS2_FvvE6Tuple0E3RunEv
-}
-{
- bug_75018_c
- Memcheck:Cond
- fun:_ZNK6Pickle9ReadBytesEPPvPPKci
- fun:_ZN7fileapi20FileSystemUsageCache4ReadERK8FilePathPj
- fun:_ZN7fileapi20FileSystemUsageCache8GetUsageERK8FilePath
- fun:_ZN7fileapi22FileSystemUsageTracker12GetUsageTask15RunOnFileThreadEv
- fun:_Z16DispatchToMethodIN7fileapi22FileSystemUsageTracker12GetUsageTaskEMS2_FvvEEvPT_T0_RK6Tuple0
- fun:_ZN14RunnableMethodIN7fileapi22FileSystemUsageTracker12GetUsageTaskEMS2_FvvE6Tuple0E3RunEv
-}
-{
bug_75019
Memcheck:Leak
fun:_Znw*
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;