From cb282c57c4552612c0166b6c8336015070a0a891 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Sun, 13 Feb 2022 18:44:27 +0000 Subject: [PATCH] cursor: Map cursor buffers before access --- src/cursor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cursor.c b/src/cursor.c index 3e22759..062223d 100644 --- a/src/cursor.c +++ b/src/cursor.c @@ -35,6 +35,9 @@ int cursor_encode(struct vec* dst, struct rfb_pixel_format* pixfmt, int rc = -1; + if (nvnc_fb_map(image) < 0) + return -1; + struct rfb_pixel_format srcfmt = { 0 }; rc = rfb_pixfmt_from_fourcc(&srcfmt, image->fourcc_format); if (rc < 0)