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

Unified Diff: base/file_util_proxy.cc

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
Index: base/file_util_proxy.cc
===================================================================
--- base/file_util_proxy.cc (revision 96790)
+++ base/file_util_proxy.cc (working copy)
@@ -866,6 +866,8 @@
const char* buffer,
int bytes_to_write,
WriteCallback* callback) {
+ if (bytes_to_write <= 0)
+ return false;
return Start(FROM_HERE, message_loop_proxy,
new RelayWrite(file, offset, buffer, bytes_to_write, callback));
}
« no previous file with comments | « base/file_util_proxy.h ('k') | ppapi/c/ppb_file_io.h » ('j') | ppapi/c/ppb_file_io.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698