Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Unified Diff: net/ftp/ftp_network_transaction.cc

Issue 1082008: Fix the out-of-bounds array read in the ftp response... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ftp/ftp_network_transaction.cc
===================================================================
--- net/ftp/ftp_network_transaction.cc (revision 42180)
+++ net/ftp/ftp_network_transaction.cc (working copy)
@@ -739,7 +739,7 @@
}
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698