From 7fa074e60b6a8bc8c0669651554d3668a57563b2 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Sun, 19 Jan 2020 21:27:17 +0000 Subject: [PATCH] server: Close client if no frame encoding method is available --- src/server.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index 2209590..c445253 100644 --- a/src/server.c +++ b/src/server.c @@ -688,7 +688,11 @@ void do_client_update_fb(uv_work_t* work) const struct nvnc_fb* fb = update->fb; enum rfb_encodings encoding = choose_frame_encoding(client); - assert(encoding != -1); + if (encoding == -1) { + uv_read_stop((uv_stream_t*)&client->stream_handle); + client_unref(client); + return; + } switch (encoding) { case RFB_ENCODING_RAW: