diff options
author | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-03 04:11:54 +0000 |
---|---|---|
committer | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-03 04:11:54 +0000 |
commit | 10cbaf017570ba6454174c55b844647aa6a9b3b4 (patch) | |
tree | beba11e7fafcfa0479e91570bb221f221659d9b7 /ipc/ipc_message_utils.cc | |
parent | 3c47f7247a0a92f61cb86661790ac2b386ee1030 (diff) | |
download | chromium_src-10cbaf017570ba6454174c55b844647aa6a9b3b4.zip chromium_src-10cbaf017570ba6454174c55b844647aa6a9b3b4.tar.gz chromium_src-10cbaf017570ba6454174c55b844647aa6a9b3b4.tar.bz2 |
Validate that paths don't contain embedded NULLs at deserialization.
BUG=166867
Review URL: https://chromiumcodereview.appspot.com/11743009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174935 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_message_utils.cc')
-rw-r--r-- | ipc/ipc_message_utils.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc index 5e7067e..babecdc 100644 --- a/ipc/ipc_message_utils.cc +++ b/ipc/ipc_message_utils.cc @@ -508,6 +508,9 @@ bool ParamTraits<FilePath>::Read(const Message* m, FilePath::StringType value; if (!ParamTraits<FilePath::StringType>::Read(m, iter, &value)) return false; + // Reject embedded NULs as they can cause security checks to go awry. + if (value.find(FILE_PATH_LITERAL('\0')) != FilePath::StringType::npos) + return false; *r = FilePath(value); return true; } |