0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-27 07:31:03 +08:00

Merge pull request #3901 from bluca/fuzzers

Problem: test_connect_null_fuzzer doesn't correctly initialise messages
This commit is contained in:
Doron Somech 2020-05-07 13:34:26 +03:00 committed by GitHub
commit 061ce6cea1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -94,7 +94,7 @@ void test_bind_null_fuzzer ()
int main (int argc, char **argv)
{
setup_test_environment (0);
setup_test_environment ();
UNITY_BEGIN ();
RUN_TEST (test_bind_null_fuzzer);

View File

@ -71,8 +71,10 @@ extern "C" int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size)
zmq_msg_t msg;
zmq_msg_init (&msg);
while (-1 != zmq_msg_recv (&msg, client, ZMQ_DONTWAIT))
while (-1 != zmq_msg_recv (&msg, client, ZMQ_DONTWAIT)) {
zmq_msg_close (&msg);
zmq_msg_init (&msg);
}
close (server_accept);
close (server);
@ -106,7 +108,7 @@ void test_connect_null_fuzzer ()
int main (int argc, char **argv)
{
setup_test_environment (0);
setup_test_environment ();
UNITY_BEGIN ();
RUN_TEST (test_connect_null_fuzzer);

View File

@ -197,7 +197,7 @@ void test_client_server_ipc ()
int main ()
{
setup_test_environment (0);
setup_test_environment ();
UNITY_BEGIN ();
RUN_TEST (test_req_rep_tcp);