diff options
author | inferno@chromium.org <inferno@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-22 00:36:31 +0000 |
---|---|---|
committer | inferno@chromium.org <inferno@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-22 00:36:31 +0000 |
commit | 625e4de916762706ea51a009af58014927a2e25b (patch) | |
tree | d388a48c537fa31461cdbede78fb29d5ef402f8d /net/ftp/ftp_network_transaction.cc | |
parent | be853e508095ecb7e148b726ad676962f1d93b97 (diff) | |
download | chromium_src-625e4de916762706ea51a009af58014927a2e25b.zip chromium_src-625e4de916762706ea51a009af58014927a2e25b.tar.gz chromium_src-625e4de916762706ea51a009af58014927a2e25b.tar.bz2 |
Fix the out-of-bounds array read in the ftp response.
BUG=38845
TEST=Pass a ftp server response having two double quotes with no character in between and verify no browser crash happens.
Review URL: http://codereview.chromium.org/1082008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42204 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/ftp/ftp_network_transaction.cc')
-rw-r--r-- | net/ftp/ftp_network_transaction.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ftp/ftp_network_transaction.cc b/net/ftp/ftp_network_transaction.cc index b244009..d9d2b88 100644 --- a/net/ftp/ftp_network_transaction.cc +++ b/net/ftp/ftp_network_transaction.cc @@ -739,7 +739,7 @@ int FtpNetworkTransaction::ProcessResponsePWD(const FtpCtrlResponse& response) { } if (system_type_ == SYSTEM_TYPE_VMS) line = FtpUtil::VMSPathToUnix(line); - if (line[line.length() - 1] == '/') + if (line.length() && line[line.length() - 1] == '/') line.erase(line.length() - 1); current_remote_directory_ = line; next_state_ = STATE_CTRL_WRITE_TYPE; |