From 61fad8c96b7a2266dbbef7e6a08cb45858f6e3ac Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Tue, 4 Jul 2023 22:56:52 +0000 Subject: [PATCH] server: Actually send a reason when handshake fails --- src/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index 9e569ad..05d2bee 100644 --- a/src/server.c +++ b/src/server.c @@ -217,7 +217,7 @@ static int security_handshake_failed(struct nvnc_client* client, *result = htonl(RFB_SECURITY_HANDSHAKE_FAILED); reason->length = htonl(strlen(reason_string)); - (void)strcmp(reason->message, reason_string); + strcpy(reason->message, reason_string); size_t len = sizeof(*result) + sizeof(*reason) + strlen(reason_string); stream_write(client->net_stream, buffer, len, close_after_write,