summaryrefslogtreecommitdiffstats
path: root/base/file_util_proxy.h
diff options
context:
space:
mode:
authorsanga@chromium.org <sanga@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-17 16:45:48 +0000
committersanga@chromium.org <sanga@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-17 16:45:48 +0000
commita88016d19c4e05687cc9b1cf10fda7ef849c3db9 (patch)
tree2387d3694246441c7276e7cd41fd66745b1a16b7 /base/file_util_proxy.h
parentcc25dba3d78ec1657aaa5ad9f286ac771b5c9bc4 (diff)
downloadchromium_src-a88016d19c4e05687cc9b1cf10fda7ef849c3db9.zip
chromium_src-a88016d19c4e05687cc9b1cf10fda7ef849c3db9.tar.gz
chromium_src-a88016d19c4e05687cc9b1cf10fda7ef849c3db9.tar.bz2
Adding checks to guard against buffer overruns in QuotaFileIO::Write and base::FileUtilProxy::Write
Also made some minor changes to fix lint warnings. There are no tests for base::FileUtilProxy. BUG= http://code.google.com/p/nativeclient/issues/detail?id=2076 TEST= test_shell_tests Review URL: http://codereview.chromium.org/7651002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97147 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util_proxy.h')
-rw-r--r--base/file_util_proxy.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/base/file_util_proxy.h b/base/file_util_proxy.h
index 928004a..872da44 100644
--- a/base/file_util_proxy.h
+++ b/base/file_util_proxy.h
@@ -168,6 +168,7 @@ class BASE_EXPORT FileUtilProxy {
// Writes to a file. If |offset| is greater than the length of the file,
// |false| is returned. On success, the file pointer is moved to position
// |offset + bytes_to_write| in the file. The callback can be NULL.
+ // |bytes_to_write| must be greater than zero.
static bool Write(
scoped_refptr<MessageLoopProxy> message_loop_proxy,
PlatformFile file,