Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(789)

Unified Diff: ppapi/c/ppb_file_io.h

Issue 7651002: Adding checks to guard against buffer overruns in QuotaFileIO::Write and base::FileUtilProxy::Write (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/file_util_proxy.cc ('k') | webkit/plugins/ppapi/quota_file_io.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/c/ppb_file_io.h
===================================================================
--- ppapi/c/ppb_file_io.h (revision 96790)
+++ ppapi/c/ppb_file_io.h (working copy)
@@ -164,7 +164,7 @@
* @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 @@
* @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.
noelallen_use_chromium 2011/08/17 18:56:10 These changes will be lost on the next generation.
*/
int32_t (*Write)(PP_Resource file_io,
int64_t offset,
@@ -243,4 +245,3 @@
*/
#endif /* PPAPI_C_PPB_FILE_IO_H_ */
-
« no previous file with comments | « base/file_util_proxy.cc ('k') | webkit/plugins/ppapi/quota_file_io.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698