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

Unified Diff: net/url_request/url_request_new_ftp_job.cc

Issue 159663: Fix a hang if directory listing size is > 8K, for example,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Upload before checkin Created 11 years, 5 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 | « net/ftp/ftp_network_transaction.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_new_ftp_job.cc
===================================================================
--- net/url_request/url_request_new_ftp_job.cc (revision 22106)
+++ net/url_request/url_request_new_ftp_job.cc (working copy)
@@ -180,7 +180,6 @@
int bytes_read) {
std::string file_entry;
std::string line;
- buf->data()[bytes_read] = 0;
// If all we've seen so far is ASCII, encoding_ is empty. Try to detect the
// encoding. We don't do the separate UTF-8 check here because the encoding
@@ -196,7 +195,7 @@
encoding_ = DetectEncoding(buf->data(), bytes_read);
int64 file_size;
- std::istringstream iss(buf->data());
+ std::istringstream iss(std::string(buf->data(), bytes_read));
while (getline(iss, line)) {
struct net::ListState state;
struct net::ListResult result;
« no previous file with comments | « net/ftp/ftp_network_transaction.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698