diff options
author | dobin <dobin@broken.ch> | 2018-04-14 15:55:23 +0200 |
---|---|---|
committer | dobin <dobin@broken.ch> | 2018-04-14 15:55:23 +0200 |
commit | 040a98ed1359b125daec314729378bdc900f603b (patch) | |
tree | 29b7faad7d658f7e6d6306e96b789a0331933aa1 /socketfuzzer.c | |
parent | b3d0245e327204d487d4ac54c3a536e6e55cef65 (diff) | |
download | honggfuzz-040a98ed1359b125daec314729378bdc900f603b.tar.gz |
support for multiple parallel honggfuzz processes in socketfuzzer mode
Adds pid to socket used for socketfuzzer mode, so it is possible
to start and use multiple honggfuzz instances at the same time.
Diffstat (limited to 'socketfuzzer.c')
-rw-r--r-- | socketfuzzer.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/socketfuzzer.c b/socketfuzzer.c index b039077a..14a5f246 100644 --- a/socketfuzzer.c +++ b/socketfuzzer.c @@ -124,8 +124,7 @@ bool setupSocketFuzzer(honggfuzz_t* run) { socklen_t t; struct sockaddr_un local, remote; char socketPath[512]; - // snprintf(socketPath, sizeof(socketPath), "/tmp/honggfuzz_socket.%i", getpid()); - snprintf(socketPath, sizeof(socketPath), "/tmp/honggfuzz_socket"); + snprintf(socketPath, sizeof(socketPath), "/tmp/honggfuzz_socket.%i", getpid()); if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) { perror("socket"); @@ -161,7 +160,6 @@ bool setupSocketFuzzer(honggfuzz_t* run) { void cleanupSocketFuzzer() { char socketPath[512]; - // snprintf(socketPath, sizeof(socketPath), "/tmp/honggfuzz_socket.%i", getpid()); - snprintf(socketPath, sizeof(socketPath), "/tmp/honggfuzz_socket"); + snprintf(socketPath, sizeof(socketPath), "/tmp/honggfuzz_socket.%i", getpid()); unlink(socketPath); } |