Skip to content

Commit

Permalink
chore: Add missing module dependencies.
Browse files Browse the repository at this point in the history
Also flip some callback asserts, because they can be reached by fuzzing
eventually.

Also update the bootstrapd checksum, since the alpine image changed a
bit.
  • Loading branch information
iphydf committed Aug 10, 2023
1 parent 172f279 commit 2e02d56
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 10 deletions.
2 changes: 1 addition & 1 deletion other/bootstrap_daemon/docker/tox-bootstrapd.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
62d2c7ab2a14d1f9b00acaf13813b3ea916ccfb2173c9ba95ac82a843a258119 /usr/local/bin/tox-bootstrapd
57f46dbb45034232c62e29ad31fd433ad298591fd9d3ea06b92040d33b8d8660 /usr/local/bin/tox-bootstrapd
14 changes: 7 additions & 7 deletions testing/fuzzing/e2e_fuzz_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void setup_callbacks(Tox_Dispatch *dispatch)
});
tox_events_callback_conference_connected(
dispatch, [](Tox *tox, const Tox_Event_Conference_Connected *event, void *user_data) {
assert(event == nullptr);
assert(event != nullptr);
});
tox_events_callback_conference_invite(
dispatch, [](Tox *tox, const Tox_Event_Conference_Invite *event, void *user_data) {
Expand All @@ -35,19 +35,19 @@ void setup_callbacks(Tox_Dispatch *dispatch)
});
tox_events_callback_conference_message(
dispatch, [](Tox *tox, const Tox_Event_Conference_Message *event, void *user_data) {
assert(event == nullptr);
assert(event != nullptr);
});
tox_events_callback_conference_peer_list_changed(dispatch,
[](Tox *tox, const Tox_Event_Conference_Peer_List_Changed *event, void *user_data) {
assert(event == nullptr);
assert(event != nullptr);
});
tox_events_callback_conference_peer_name(
dispatch, [](Tox *tox, const Tox_Event_Conference_Peer_Name *event, void *user_data) {
assert(event == nullptr);
assert(event != nullptr);
});
tox_events_callback_conference_title(
dispatch, [](Tox *tox, const Tox_Event_Conference_Title *event, void *user_data) {
assert(event == nullptr);
assert(event != nullptr);
});
tox_events_callback_file_chunk_request(
dispatch, [](Tox *tox, const Tox_Event_File_Chunk_Request *event, void *user_data) {
Expand All @@ -61,11 +61,11 @@ void setup_callbacks(Tox_Dispatch *dispatch)
});
tox_events_callback_file_recv_chunk(
dispatch, [](Tox *tox, const Tox_Event_File_Recv_Chunk *event, void *user_data) {
assert(event == nullptr);
assert(event != nullptr);
});
tox_events_callback_file_recv_control(
dispatch, [](Tox *tox, const Tox_Event_File_Recv_Control *event, void *user_data) {
assert(event == nullptr);
assert(event != nullptr);
});
tox_events_callback_friend_connection_status(
dispatch, [](Tox *tox, const Tox_Event_Friend_Connection_Status *event, void *user_data) {
Expand Down
5 changes: 5 additions & 0 deletions toxav/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ cc_library(
"//c-toxcore/toxcore:ccompat",
"//c-toxcore/toxcore:logger",
"//c-toxcore/toxcore:mono_time",
"//c-toxcore/toxcore:tox",
"//c-toxcore/toxcore:util",
],
)
Expand All @@ -68,6 +69,7 @@ cc_library(
"//c-toxcore/toxcore:ccompat",
"//c-toxcore/toxcore:logger",
"//c-toxcore/toxcore:mono_time",
"//c-toxcore/toxcore:tox",
"//c-toxcore/toxcore:util",
],
)
Expand All @@ -94,6 +96,7 @@ cc_library(
"//c-toxcore/toxcore:ccompat",
"//c-toxcore/toxcore:logger",
"//c-toxcore/toxcore:mono_time",
"//c-toxcore/toxcore:util",
"@opus",
],
)
Expand All @@ -113,6 +116,7 @@ cc_library(
":public_api",
":ring_buffer",
":rtp",
"//c-toxcore/toxcore:Messenger",
"//c-toxcore/toxcore:ccompat",
"//c-toxcore/toxcore:logger",
"//c-toxcore/toxcore:mono_time",
Expand All @@ -129,6 +133,7 @@ cc_library(
deps = [
"//c-toxcore/toxcore",
"//c-toxcore/toxcore:ccompat",
"//c-toxcore/toxcore:group",
"//c-toxcore/toxcore:logger",
"//c-toxcore/toxcore:mono_time",
"//c-toxcore/toxcore:tox",
Expand Down
28 changes: 26 additions & 2 deletions toxcore/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ cc_library(
hdrs = ["bin_pack.h"],
visibility = ["//c-toxcore:__subpackages__"],
deps = [
":attributes",
":ccompat",
"//c-toxcore/third_party:cmp",
],
Expand All @@ -70,6 +71,7 @@ cc_library(
hdrs = ["bin_unpack.h"],
visibility = ["//c-toxcore:__subpackages__"],
deps = [
":attributes",
":ccompat",
"//c-toxcore/third_party:cmp",
],
Expand All @@ -93,6 +95,7 @@ cc_library(
hdrs = ["crypto_core.h"],
visibility = ["//c-toxcore:__subpackages__"],
deps = [
":attributes",
":ccompat",
"@libsodium",
],
Expand All @@ -115,7 +118,10 @@ cc_library(
name = "list",
srcs = ["list.c"],
hdrs = ["list.h"],
deps = [":ccompat"],
deps = [
":attributes",
":ccompat",
],
)

cc_test(
Expand All @@ -139,7 +145,10 @@ cc_library(
"//c-toxcore/other/bootstrap_daemon:__pkg__",
"//c-toxcore/toxav:__pkg__",
],
deps = [":ccompat"],
deps = [
":attributes",
":ccompat",
],
)

cc_library(
Expand All @@ -164,6 +173,7 @@ cc_library(
"//c-toxcore/toxav:__pkg__",
],
deps = [
":attributes",
":ccompat",
"@pthread",
],
Expand Down Expand Up @@ -301,6 +311,7 @@ cc_library(
],
deps = [
":LAN_discovery",
":attributes",
":ccompat",
":crypto_core",
":logger",
Expand Down Expand Up @@ -344,6 +355,7 @@ cc_library(
":DHT",
":ccompat",
":crypto_core",
":logger",
":mono_time",
":shared_key_cache",
":util",
Expand Down Expand Up @@ -398,7 +410,9 @@ cc_library(
hdrs = ["TCP_common.h"],
visibility = ["//c-toxcore/auto_tests:__pkg__"],
deps = [
":attributes",
":ccompat",
":crypto_core",
":network",
],
)
Expand Down Expand Up @@ -436,8 +450,10 @@ cc_library(
deps = [
":TCP_common",
":ccompat",
":crypto_core",
":forwarding",
":mono_time",
":network",
":util",
],
)
Expand Down Expand Up @@ -478,9 +494,11 @@ cc_library(
visibility = ["//c-toxcore/auto_tests:__pkg__"],
deps = [
":DHT",
":LAN_discovery",
":TCP_connection",
":ccompat",
":list",
":logger",
":mono_time",
":util",
],
Expand All @@ -499,6 +517,7 @@ cc_library(
":DHT",
":LAN_discovery",
":ccompat",
":logger",
":mono_time",
":onion",
":shared_key_cache",
Expand Down Expand Up @@ -577,6 +596,7 @@ cc_library(
":net_crypto",
":network",
":onion_announce",
":ping_array",
":util",
],
)
Expand All @@ -588,6 +608,7 @@ cc_library(
visibility = ["//c-toxcore/auto_tests:__pkg__"],
deps = [
":DHT",
":LAN_discovery",
":ccompat",
":mono_time",
":net_crypto",
Expand Down Expand Up @@ -698,6 +719,7 @@ cc_library(
":forwarding",
":friend_connection",
":friend_requests",
":group_announce",
":group_moderation",
":group_onion_announce",
":logger",
Expand Down Expand Up @@ -768,6 +790,7 @@ cc_library(
hdrs = ["tox_unpack.h"],
visibility = ["//c-toxcore:__subpackages__"],
deps = [
":attributes",
":bin_unpack",
":ccompat",
":tox",
Expand All @@ -783,6 +806,7 @@ cc_library(
hdrs = ["tox_events.h"],
visibility = ["//c-toxcore:__subpackages__"],
deps = [
":attributes",
":bin_pack",
":bin_unpack",
":ccompat",
Expand Down

0 comments on commit 2e02d56

Please sign in to comment.