From: Laurent Vivier <lvivier@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>, qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Marcelo Tosatti" <mtosatti@redhat.com>,
kvm@vger.kernel.org, "Daniel P. Berrangé" <berrange@redhat.com>
Subject: Re: [PATCH 5/5] ui/input-barrier: fix off-by-one in keycode bounds check
Date: Fri, 10 Jul 2026 15:43:58 +0200 [thread overview]
Message-ID: <ec03b514-3252-4895-bb93-e577f5347b18@redhat.com> (raw)
In-Reply-To: <20260706-fix-v1-5-4b83a70e9f3b@redhat.com>
On 7/6/26 14:53, Marc-André Lureau wrote:
> Use strict "<" to fix the off-by-one.
>
> Fixes: 6105683da35b ("ui: add an embedded Barrier client")
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3951
> Reported-by: huntr bubble
> Signed-off-by: Marc-Andre Lureau <marcandre.lureau@redhat.com>
> ---
> ui/input-barrier.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ui/input-barrier.c b/ui/input-barrier.c
> index d07027114af..0a238d4010b 100644
> --- a/ui/input-barrier.c
> +++ b/ui/input-barrier.c
> @@ -87,7 +87,7 @@ static kbd_layout_t *kbd_layout;
> static unsigned int input_barrier_to_linux(uint16_t keyid, uint16_t keycode)
> {
> /* keycode is optional, if it is not provided use keyid */
> - if (keycode && keycode <= qemu_input_map_xorgkbd_to_linux_len) {
> + if (keycode && keycode < qemu_input_map_xorgkbd_to_linux_len) {
> return qemu_input_map_xorgkbd_to_linux[keycode];
> }
>
>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
prev parent reply other threads:[~2026-07-10 13:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 12:53 [PATCH 0/5] Various UI/security-related fixes Marc-André Lureau
2026-07-06 12:53 ` [PATCH 1/5] i386/tdx: fix uninitialized variable warning in tdx_check_features Marc-André Lureau
2026-07-06 12:53 ` [PATCH 2/5] ui/vnc: fix OOB write in vnc_refresh_lossy_rect Marc-André Lureau
2026-07-06 12:53 ` [PATCH 3/5] ui/vnc: validate color shifts in SetPixelFormat Marc-André Lureau
2026-07-06 12:53 ` [PATCH 4/5] ui/vnc: use RFB wire types for client message handlers Marc-André Lureau
2026-07-06 12:53 ` [PATCH 5/5] ui/input-barrier: fix off-by-one in keycode bounds check Marc-André Lureau
2026-07-10 13:43 ` Laurent Vivier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ec03b514-3252-4895-bb93-e577f5347b18@redhat.com \
--to=lvivier@redhat.com \
--cc=berrange@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=marcandre.lureau@redhat.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox