diff --git a/other/docker/sources/run.sh b/other/docker/sources/run.sh index 2259513d3a..3335f3d579 100644 --- a/other/docker/sources/run.sh +++ b/other/docker/sources/run.sh @@ -18,4 +18,4 @@ if [ -f "$DOCKERDIR/dockerignore" ]; then cat "$DOCKERDIR/dockerignore" >>"$DOCKERDIR/$BUILD.Dockerfile.dockerignore" fi -docker build -t "toxchat/c-toxcore:$BUILD" -f "other/docker/$BUILD/$BUILD.Dockerfile" . +docker build "${DOCKERFLAGS[@]}" -t "toxchat/c-toxcore:$BUILD" -f "other/docker/$BUILD/$BUILD.Dockerfile" . diff --git a/toxcore/group_chats.c b/toxcore/group_chats.c index aa010b2e33..fae54c6212 100644 --- a/toxcore/group_chats.c +++ b/toxcore/group_chats.c @@ -5560,12 +5560,12 @@ static int make_gc_handshake_packet(const GC_Chat *chat, const GC_Connection *gc uint8_t request_type, uint8_t join_type, uint8_t *packet, size_t packet_size, const Node_format *node) { - if (packet_size != GC_MIN_ENCRYPTED_HS_PAYLOAD_SIZE + sizeof(Node_format)) { - LOGGER_FATAL(chat->log, "invalid packet size: %zu", packet_size); + if (chat == nullptr || gconn == nullptr || node == nullptr) { return -1; } - if (chat == nullptr || gconn == nullptr || node == nullptr) { + if (packet_size != GC_MIN_ENCRYPTED_HS_PAYLOAD_SIZE + sizeof(Node_format)) { + LOGGER_FATAL(chat->log, "invalid packet size: %zu", packet_size); return -1; }