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/md5_digester.cc | |
| parent | aa3565457977dabb658f41c71e14151473b91f07 (diff) | |
Use SafeStringStream instead of std::stringstream to try to fix random crashes on OS X.
Diffstat (limited to 'src/lib/md5_digester.cc')
| -rw-r--r-- | src/lib/md5_digester.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/md5_digester.cc b/src/lib/md5_digester.cc index 1244209bd..1d4d1974a 100644 --- a/src/lib/md5_digester.cc +++ b/src/lib/md5_digester.cc @@ -18,12 +18,11 @@ */ #include <iomanip> -#include <sstream> #include <openssl/md5.h> #include "md5_digester.h" +#include "safe_stringstream.h" using std::string; -using std::stringstream; using std::hex; using std::setfill; using std::setw; @@ -51,7 +50,7 @@ MD5Digester::get () const unsigned char digest[MD5_DIGEST_LENGTH]; MD5_Final (digest, &_context); - stringstream s; + SafeStringStream s; for (int i = 0; i < MD5_DIGEST_LENGTH; ++i) { s << hex << setfill('0') << setw(2) << ((int) digest[i]); } |
