@@ -107,6 +107,9 @@ void setup_callbacks(Tox_Dispatch *dispatch)
107107
108108void TestBootstrap (Fuzz_Data &input)
109109{
110+ // Null system for regularly working memory allocations needed in
111+ // tox_events_equal.
112+ Null_System null_sys;
110113 Fuzz_System sys (input);
111114
112115 Ptr<Tox_Options> opts (tox_options_new (nullptr ), tox_options_free);
@@ -154,11 +157,9 @@ void TestBootstrap(Fuzz_Data &input)
154157
155158 uint8_t pub_key[TOX_PUBLIC_KEY_SIZE] = {0 };
156159
157- const bool udp_success = tox_bootstrap (tox, " 127.0.0.2" , 33446 , pub_key, nullptr );
158- assert (udp_success);
159-
160- const bool tcp_success = tox_add_tcp_relay (tox, " 127.0.0.2" , 33446 , pub_key, nullptr );
161- assert (tcp_success);
160+ // These may fail, but that's ok. We ignore their return values.
161+ tox_bootstrap (tox, " 127.0.0.2" , 33446 , pub_key, nullptr );
162+ tox_add_tcp_relay (tox, " 127.0.0.2" , 33446 , pub_key, nullptr );
162163
163164 tox_events_init (tox);
164165
@@ -169,7 +170,7 @@ void TestBootstrap(Fuzz_Data &input)
169170 while (input.size > 0 ) {
170171 Tox_Err_Events_Iterate error_iterate;
171172 Tox_Events *events = tox_events_iterate (tox, true , &error_iterate);
172- assert (tox_events_equal (sys .sys .get (), events, events));
173+ assert (tox_events_equal (null_sys .sys .get (), events, events));
173174 tox_dispatch_invoke (dispatch, events, tox, nullptr );
174175 tox_events_free (events);
175176 // Move the clock forward a decent amount so all the time-based checks
0 commit comments