diff --git a/other/bootstrap_daemon/docker/tox-bootstrapd.sha256 b/other/bootstrap_daemon/docker/tox-bootstrapd.sha256 index a316ea133e..fdbc608a1a 100644 --- a/other/bootstrap_daemon/docker/tox-bootstrapd.sha256 +++ b/other/bootstrap_daemon/docker/tox-bootstrapd.sha256 @@ -1 +1 @@ -3acc3a1f08e67dac66d91657a36d98be397fa3f14bc4798d3349605e37a90fc3 /usr/local/bin/tox-bootstrapd +7c8a322c4d6ec0e26c5f8aa017ede9d39a306f1e3590928728623ab48e29f8b8 /usr/local/bin/tox-bootstrapd diff --git a/toxcore/group_chats.c b/toxcore/group_chats.c index ab85dfaaf6..4c2b53b94c 100644 --- a/toxcore/group_chats.c +++ b/toxcore/group_chats.c @@ -5020,12 +5020,6 @@ static bool custom_gc_packet_length_is_valid(uint16_t length, bool lossless) return true; } -/** @brief Returns false if a custom incoming (non private) packet is too large. */ -static bool custom_gc_incoming_non_private_packet_length_is_valid(uint16_t length, bool lossless) -{ - return length <= (lossless ? MAX_GC_CUSTOM_LOSSLESS_INCOMING_ASSEMBLED_PACKET_SIZE : MAX_GC_CUSTOM_LOSSY_PACKET_SIZE); -} - int gc_send_custom_private_packet(const GC_Chat *chat, bool lossless, uint32_t peer_id, const uint8_t *message, uint16_t length) { @@ -5124,7 +5118,7 @@ non_null(1, 2, 3, 4) nullable(7) static int handle_gc_custom_packet(const GC_Session *c, const GC_Chat *chat, const GC_Peer *peer, const uint8_t *data, uint16_t length, bool lossless, void *userdata) { - if (!custom_gc_incoming_non_private_packet_length_is_valid(length, lossless)) { + if (!(length <= (lossless ? MAX_GC_CUSTOM_LOSSLESS_INCOMING_ASSEMBLED_PACKET_SIZE : MAX_GC_CUSTOM_LOSSY_PACKET_SIZE))) { return -1; }