aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmd/fuzzer.cpp
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-12-08 19:56:19 +0100
committerSimon Warta <[email protected]>2015-12-08 22:02:28 +0100
commit368d087e3973db9d8c5b70443d31c27c03dfdbef (patch)
tree9059a52c70eee8b825d9fd7fa14194940853b86a /src/cmd/fuzzer.cpp
parent53fca25da331d168b0433ba2e41b06aae9d17f5c (diff)
Replace C interfaces in cli apps with C++ interfaces
Diffstat (limited to 'src/cmd/fuzzer.cpp')
-rw-r--r--src/cmd/fuzzer.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cmd/fuzzer.cpp b/src/cmd/fuzzer.cpp
index 3174c76b8..35adb9711 100644
--- a/src/cmd/fuzzer.cpp
+++ b/src/cmd/fuzzer.cpp
@@ -48,18 +48,18 @@ class Fuzzer_Creds : public Credentials_Manager
#endif
-int fuzzer(int argc, char* argv[])
+int fuzzer(const std::vector<std::string> &args)
{
- if(argc != 3)
+ if(args.size() != 3)
{
- std::cout << "Usage: " << argv[0] << " [type] [input_file]\n";
- std::cout << "Hook for fuzzers such as afl (produces no output)\n";
- std::cout << "Types: cert crl privkey tls_client\n";
+ std::cout << "Usage: " << args[0] << " [type] [input_file]\n"
+ << "Hook for fuzzers such as afl (produces no output)\n"
+ << "Types: cert crl privkey tls_client" << std::endl;
return 1;
}
- const std::string type = argv[1];
- const std::string input = argv[2];
+ const std::string type = args[1];
+ const std::string input = args[2];
AutoSeeded_RNG rng;
@@ -132,7 +132,7 @@ int fuzzer(int argc, char* argv[])
}
#endif
- std::cout << "Unknown type '" << type << "'\n";
+ std::cout << "Unknown type '" << type << "'" << std::endl;
return 1;
}