projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Be a bit more careful with fwrite.
[dcpomatic.git]
/
src
/
lib
/
internet.cc
diff --git
a/src/lib/internet.cc
b/src/lib/internet.cc
index ad313bd3f71fb7623dcef484bc8f6d3c70b3c64f..4eba1efa3ada8762fc80a60ec684fa032c23ca6c 100644
(file)
--- a/
src/lib/internet.cc
+++ b/
src/lib/internet.cc
@@
-22,6
+22,7
@@
#include "compose.hpp"
#include "exceptions.h"
#include "cross.h"
#include "compose.hpp"
#include "exceptions.h"
#include "cross.h"
+#include "util.h"
#include <curl/curl.h>
#include <zip.h>
#include <boost/function.hpp>
#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));
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;
}
if (N < int (sizeof (buffer))) {
break;
}