summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/fuzzer/FuzzerIO.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/fuzzer/FuzzerIO.cpp')
-rw-r--r--compiler-rt/lib/fuzzer/FuzzerIO.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerIO.cpp b/compiler-rt/lib/fuzzer/FuzzerIO.cpp
index 290112aa4b1..423ab4befba 100644
--- a/compiler-rt/lib/fuzzer/FuzzerIO.cpp
+++ b/compiler-rt/lib/fuzzer/FuzzerIO.cpp
@@ -62,7 +62,7 @@ void CopyFileToErr(const std::string &Path) {
void WriteToFile(const Unit &U, const std::string &Path) {
// Use raw C interface because this function may be called from a sig handler.
- FILE *Out = fopen(Path.c_str(), "w");
+ FILE *Out = fopen(Path.c_str(), "wb");
if (!Out) return;
fwrite(U.data(), sizeof(U[0]), U.size(), Out);
fclose(Out);
OpenPOWER on IntegriCloud