diff options
author | leighton@cis.udel.edu <leighton@cis.udel.edu@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-11 19:50:42 +0000 |
---|---|---|
committer | leighton@cis.udel.edu <leighton@cis.udel.edu@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-11 19:50:42 +0000 |
commit | 794d05144dfc1a52ee22467b69951f658964cd9a (patch) | |
tree | 4be0303f91867264a90b0ca33e9e5ac06a9c1b6e /net/tools | |
parent | 0f5525558f76c9f60fa05266b19e6e0102e3137c (diff) | |
download | chromium_src-794d05144dfc1a52ee22467b69951f658964cd9a.zip chromium_src-794d05144dfc1a52ee22467b69951f658964cd9a.tar.gz chromium_src-794d05144dfc1a52ee22467b69951f658964cd9a.tar.bz2 |
The flip server's --http-server and --spdy-server switches for don't function
as advertised. If the ssl cert and key fields are left empty to disable ssl,
flip_in_mem_edsm_server will segfault.
For these switches, the split function is expected to return a std::vector of size 4, but leaving the ssl cert and key fields empty results in a std::vector of size 2.
BUG=NONE
TEST=none
Review URL: http://codereview.chromium.org/6949002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85023 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/tools')
-rw-r--r-- | net/tools/flip_server/flip_in_mem_edsm_server.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/tools/flip_server/flip_in_mem_edsm_server.cc b/net/tools/flip_server/flip_in_mem_edsm_server.cc index f8abfb7..8ba1505 100644 --- a/net/tools/flip_server/flip_in_mem_edsm_server.cc +++ b/net/tools/flip_server/flip_in_mem_edsm_server.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -334,6 +334,8 @@ int main (int argc, char**argv) spdy_memory_cache.AddFiles(); std::string value = cl.GetSwitchValueASCII("spdy-server"); std::vector<std::string> valueArgs = split(value, ','); + while (valueArgs.size() < 4) + valueArgs.push_back(""); g_proxy_config.AddAcceptor(net::FLIP_HANDLER_SPDY_SERVER, valueArgs[0], valueArgs[1], valueArgs[2], valueArgs[3], @@ -353,6 +355,8 @@ int main (int argc, char**argv) http_memory_cache.AddFiles(); std::string value = cl.GetSwitchValueASCII("http-server"); std::vector<std::string> valueArgs = split(value, ','); + while (valueArgs.size() < 4) + valueArgs.push_back(""); g_proxy_config.AddAcceptor(net::FLIP_HANDLER_HTTP_SERVER, valueArgs[0], valueArgs[1], valueArgs[2], valueArgs[3], |