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

Unified Diff: base/file_util_proxy.cc

Issue 7655009: Adding guards against heap overflow in PPB_FileIO::Read (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 | « no previous file | ppapi/tests/test_file_io.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util_proxy.cc
===================================================================
--- base/file_util_proxy.cc (revision 97034)
+++ base/file_util_proxy.cc (working copy)
@@ -854,6 +854,8 @@
int64 offset,
int bytes_to_read,
ReadCallback* callback) {
+ if (bytes_to_read < 0)
+ return false;
return Start(FROM_HERE, message_loop_proxy,
new RelayRead(file, offset, bytes_to_read, callback));
}
« no previous file with comments | « no previous file | ppapi/tests/test_file_io.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698