Index: net/ftp/ftp_directory_listing_parser_ls.cc |
diff --git a/net/ftp/ftp_directory_listing_parser_ls.cc b/net/ftp/ftp_directory_listing_parser_ls.cc |
index 96d0dc84607a40f934a2eb882ad06249451db970..b259cad0111bb3b2b8c2244f0a4e6a96417b9870 100644 |
--- a/net/ftp/ftp_directory_listing_parser_ls.cc |
+++ b/net/ftp/ftp_directory_listing_parser_ls.cc |
@@ -142,11 +142,12 @@ bool ParseFtpDirectoryListingLs( |
if (columns.size() == 2 && !received_total_line) { |
received_total_line = true; |
+ // Some FTP servers incorrectly return a negative integer for "n". Since |
+ // this value is ignored anyway, just check any valid integer was |
+ // provided. |
int64 total_number; |
if (!base::StringToInt64(columns[1], &total_number)) |
return false; |
- if (total_number < 0) |
- return false; |
continue; |
} |