git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236548
91177308-0d34-0410-b5e6-
96231b3b80d8
return DirPath + "/" + FileName;
}
+void PrintFileAsBase64(const std::string &Path) {
+ std::string Cmd = "base64 -w 0 < " + Path + "; echo";
+ system(Cmd.c_str());
+}
+
} // namespace fuzzer
void PrintASCII(const Unit &U, const char *PrintAfter = "");
std::string Hash(const Unit &U);
void SetTimer(int Seconds);
+void PrintFileAsBase64(const std::string &Path);
class Fuzzer {
public:
std::string Path = Prefix + Hash(U);
WriteToFile(U, Path);
std::cerr << "CRASHED; file written to " << Path << std::endl;
+ std::cerr << "Base64: ";
+ PrintFileAsBase64(Path);
}
void Fuzzer::SaveCorpus() {