diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-08-19 21:01:28 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-08-19 21:01:28 +0100 |
| commit | 9a2b45caa81d8fb056802dfe3c25f214e808ffdf (patch) | |
| tree | 1cead4781d2a8546c3ba8b8f936d18bf8e8a6403 /src/lib/internet.cc | |
| parent | aa3565457977dabb658f41c71e14151473b91f07 (diff) | |
Use SafeStringStream instead of std::stringstream to try to fix random crashes on OS X.
Diffstat (limited to 'src/lib/internet.cc')
| -rw-r--r-- | src/lib/internet.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/internet.cc b/src/lib/internet.cc index 99ae5c214..c28e650fd 100644 --- a/src/lib/internet.cc +++ b/src/lib/internet.cc @@ -24,11 +24,11 @@ #include <curl/curl.h> #include <zip.h> #include "util.h" +#include "safe_stringstream.h" #include "i18n.h" using std::string; -using std::stringstream; using std::list; using boost::optional; using boost::function; @@ -130,11 +130,10 @@ ftp_ls (string url) return list<string> (); } - stringstream s (ls_raw); - string line; + SafeStringStream s (ls_raw); list<string> ls; while (s.good ()) { - getline (s, line); + string const line = s.getline (); if (line.length() > 55) { string const file = line.substr (55); if (file != "." && file != "..") { |
