Index: compiler-rt/lib/fuzzer/FuzzerIO.cpp =================================================================== --- compiler-rt/lib/fuzzer/FuzzerIO.cpp +++ compiler-rt/lib/fuzzer/FuzzerIO.cpp @@ -31,7 +31,7 @@ } Unit FileToVector(const std::string &Path, size_t MaxSize, bool ExitOnError) { - std::ifstream T(Path); + std::ifstream T(Path, std::ios::binary); if (ExitOnError && !T) { Printf("No such directory: %s; exiting\n", Path.c_str()); exit(1); @@ -51,7 +51,7 @@ } std::string FileToString(const std::string &Path) { - std::ifstream T(Path); + std::ifstream T(Path, std::ios::binary); return std::string((std::istreambuf_iterator(T)), std::istreambuf_iterator()); }