summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-05 15:19:04 +0000
committercevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-05 15:19:04 +0000
commitf3071247741d3c88d52c06613061e7f03a833769 (patch)
tree0af938d36f3ac61c6ee123f0266b3154913d08c3
parentfdbe105e55a422937d777e814fea4c963646cd30 (diff)
downloadchromium_src-f3071247741d3c88d52c06613061e7f03a833769.zip
chromium_src-f3071247741d3c88d52c06613061e7f03a833769.tar.gz
chromium_src-f3071247741d3c88d52c06613061e7f03a833769.tar.bz2
Avoid out-of-bounds array access.
TEST=NONE BUG=34710 Review URL: http://codereview.chromium.org/572031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38209 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/worker_host/worker_process_host.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/worker_host/worker_process_host.cc b/chrome/browser/worker_host/worker_process_host.cc
index 4f6d5ae..9dbfe05 100644
--- a/chrome/browser/worker_host/worker_process_host.cc
+++ b/chrome/browser/worker_host/worker_process_host.cc
@@ -287,7 +287,8 @@ void WorkerProcessHost::RelayMessage(
&message, &msg, &sent_message_port_ids, &new_routing_ids)) {
return;
}
- DCHECK(sent_message_port_ids.size() == new_routing_ids.size());
+ if (sent_message_port_ids.size() != new_routing_ids.size())
+ return;
for (size_t i = 0; i < sent_message_port_ids.size(); ++i) {
new_routing_ids[i] = next_route_id->Run();