diff options
author | sanga@chromium.org <sanga@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-17 16:45:48 +0000 |
---|---|---|
committer | sanga@chromium.org <sanga@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-17 16:45:48 +0000 |
commit | a88016d19c4e05687cc9b1cf10fda7ef849c3db9 (patch) | |
tree | 2387d3694246441c7276e7cd41fd66745b1a16b7 /ppapi | |
parent | cc25dba3d78ec1657aaa5ad9f286ac771b5c9bc4 (diff) | |
download | chromium_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 'ppapi')
-rw-r--r-- | ppapi/c/ppb_file_io.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ppapi/c/ppb_file_io.h b/ppapi/c/ppb_file_io.h index 821766d..ca23b95 100644 --- a/ppapi/c/ppb_file_io.h +++ b/ppapi/c/ppb_file_io.h @@ -164,7 +164,7 @@ struct PPB_FileIO { * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon * completion of Read(). * - * @return An The number of bytes read an error code from + * @return An The number of bytes read or an error code from * <code>pp_errors.h</code>. If the return value is 0, then end-of-file was * reached. It is valid to call Read() multiple times with a completion * callback to queue up parallel reads from the file at different offsets. @@ -190,7 +190,9 @@ struct PPB_FileIO { * @return An The number of bytes written or an error code from * <code>pp_errors.h</code>. If the return value is 0, then end-of-file was * reached. It is valid to call Write() multiple times with a completion - * callback to queue up parallel writes to the file at different offsets. + * callback to queue up parallel writes to the file at different offsets. If + * bytes_to_write is less than or equal to zero, return value is + * PP_ERROR_FAILED. */ int32_t (*Write)(PP_Resource file_io, int64_t offset, @@ -243,4 +245,3 @@ struct PPB_FileIO { */ #endif /* PPAPI_C_PPB_FILE_IO_H_ */ - |