diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-12-23 21:38:44 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-12-23 21:38:44 +0000 |
| commit | 196de029044f4dbac5f74f68e08a89f778c3a236 (patch) | |
| tree | 92ae37c7b95d8c2839834ab181ad4b0da1f35da8 /src/lib/internet.cc | |
| parent | e7a9a9a0b69d605e327d5a74abe28481d2a61179 (diff) | |
Be a bit more careful with fwrite.
Diffstat (limited to 'src/lib/internet.cc')
| -rw-r--r-- | src/lib/internet.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/internet.cc b/src/lib/internet.cc index ad313bd3f..4eba1efa3 100644 --- a/src/lib/internet.cc +++ b/src/lib/internet.cc @@ -22,6 +22,7 @@ #include "compose.hpp" #include "exceptions.h" #include "cross.h" +#include "util.h" #include <curl/curl.h> #include <zip.h> #include <boost/function.hpp> @@ -140,7 +141,7 @@ get_from_zip_url (string url, string file, bool pasv, function<void (boost::file char buffer[4096]; while (true) { int const N = zip_fread (file_in_zip, buffer, sizeof (buffer)); - fwrite (buffer, 1, N, f); + checked_fwrite (buffer, N, f, temp_cert.file()); if (N < int (sizeof (buffer))) { break; } |
