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

Unified Diff: chrome/browser/renderer_host/resource_message_filter.cc

Issue 3502001: Kill a renderer process if ViewHostMsg_AsyncOpenFile comes with a... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/resource_message_filter.cc
===================================================================
--- chrome/browser/renderer_host/resource_message_filter.cc (revision 60512)
+++ chrome/browser/renderer_host/resource_message_filter.cc (working copy)
@@ -1712,6 +1712,19 @@
return;
}
+ // TODO(dumi): update this check once we have a security attribute
+ // that allows renderers to modify files.
+ int allowed_flags =
+ base::PLATFORM_FILE_OPEN |
+ base::PLATFORM_FILE_READ |
+ base::PLATFORM_FILE_EXCLUSIVE_READ |
+ base::PLATFORM_FILE_ASYNC;
+ if (flags & ~allowed_flags) {
darin (slow to review) 2010/09/25 04:45:19 how about adding a DLOG(ERROR) here?
dumi 2010/09/27 18:58:51 done. added DLOG(ERROR) << "Bad flags in ViewMsgHo
+ BrowserRenderProcessHost::BadMessageTerminateProcess(
+ ViewHostMsg_AsyncOpenFile::ID, handle());
+ return;
+ }
+
ChromeThread::PostTask(
ChromeThread::FILE, FROM_HERE, NewRunnableMethod(
this, &ResourceMessageFilter::AsyncOpenFileOnFileThread,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698