Skip to content

Commit

Permalink
Revert "[Fuzzing] fix fuzz_server"
Browse files Browse the repository at this point in the history
This reverts commit 1c6de00.
  • Loading branch information
0x34d committed Jul 8, 2023
1 parent 1c6de00 commit 265f028
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions fuzz/fuzz_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct Fuzzer {
typedef struct Fuzzer Fuzzer;

#define PORT 5672
#define kMinInputLength 8
#define kMinInputLength 9
#define kMaxInputLength 1024

void client(Fuzzer *fuzzer);
Expand Down Expand Up @@ -93,7 +93,6 @@ void *Server(void *args) {
void clean(Fuzzer *fuzzer) {
shutdown(fuzzer->socket, SHUT_RDWR);
close(fuzzer->socket);
free(fuzzer->buffer);
free(fuzzer);
}

Expand All @@ -106,10 +105,6 @@ extern int LLVMFuzzerTestOneInput(const char *data, size_t size) {
Fuzzer *fuzzer = (Fuzzer *)malloc(sizeof(Fuzzer));
fuzzer->port = PORT;

fuzzer->size = size;
fuzzer->buffer = malloc(fuzzer->size);
memcpy(fuzzer->buffer, data, size);

fuzzinit(fuzzer);

pthread_create(&fuzzer->thread, NULL, Server, fuzzer);
Expand Down

0 comments on commit 265f028

Please sign in to comment.