| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <string> | 5 #include <string> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "sandbox/src/crosscall_server.h" | 8 #include "sandbox/win/src/crosscall_server.h" |
| 9 #include "sandbox/src/crosscall_params.h" | 9 #include "sandbox/win/src/crosscall_params.h" |
| 10 #include "sandbox/src/crosscall_client.h" | 10 #include "sandbox/win/src/crosscall_client.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 | 12 |
| 13 // This code performs the ipc message validation. Potential security flaws | 13 // This code performs the ipc message validation. Potential security flaws |
| 14 // on the ipc are likelier to be found in this code than in the rest of | 14 // on the ipc are likelier to be found in this code than in the rest of |
| 15 // the ipc code. | 15 // the ipc code. |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 // The buffer for a message must match the max channel size. | 19 // The buffer for a message must match the max channel size. |
| 20 const size_t kMaxBufferSize = sandbox::kIPCChannelSize; | 20 const size_t kMaxBufferSize = sandbox::kIPCChannelSize; |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 for (; it != ipc_calls_.end(); ++it) { | 274 for (; it != ipc_calls_.end(); ++it) { |
| 275 if (it->params.Matches(ipc)) { | 275 if (it->params.Matches(ipc)) { |
| 276 *callback = it->callback; | 276 *callback = it->callback; |
| 277 return this; | 277 return this; |
| 278 } | 278 } |
| 279 } | 279 } |
| 280 return NULL; | 280 return NULL; |
| 281 } | 281 } |
| 282 | 282 |
| 283 } // namespace sandbox | 283 } // namespace sandbox |
| OLD | NEW |