From c4aba77b8966d60098564855b611b497d6be658a Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Sat, 11 Apr 2020 12:41:18 -0700 Subject: [PATCH] Fixed bounds check for cursor image --- meshcore/KVM/Linux/linux_kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshcore/KVM/Linux/linux_kvm.c b/meshcore/KVM/Linux/linux_kvm.c index 3f7cb35..f05c7f0 100644 --- a/meshcore/KVM/Linux/linux_kvm.c +++ b/meshcore/KVM/Linux/linux_kvm.c @@ -173,7 +173,7 @@ KVM_MouseCursors kvm_fetch_currentCursor(Display *cursordisplay) char alpha[65535]; int i; - if ((size_t)(w*h) <= sizeof(alpha)) + if (((size_t)(w*h) <= sizeof(alpha)) && ((size_t)(w*h) > 6)) { for (i = 0; i < (w*h); ++i) {