From: Peter Maydell <peter.maydell@linaro.org>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH] hw/char: fix qcode array bounds check in ESCC impl
Date: Thu, 31 Mar 2022 13:27:35 +0100 [thread overview]
Message-ID: <CAFEAcA99U6RaM_mh4C-mY1RcEzyJ-+oYED0K5iPQrHCp4D5bHQ@mail.gmail.com> (raw)
In-Reply-To: <20220331122652.188700-1-berrange@redhat.com>
On Thu, 31 Mar 2022 at 13:27, Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> There was an off-by-1 in the qcode conversion array bounds
> check.
>
> Fixes: e709a61a8fe1076a487376fd657544418a38ba06
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
> hw/char/escc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/char/escc.c b/hw/char/escc.c
> index 8755d8d34f..17a908c59b 100644
> --- a/hw/char/escc.c
> +++ b/hw/char/escc.c
> @@ -828,7 +828,7 @@ static void sunkbd_handle_event(DeviceState *dev, QemuConsole *src,
> }
> }
>
> - if (qcode > qemu_input_map_qcode_to_sun_len) {
> + if (qcode >= qemu_input_map_qcode_to_sun_len) {
> return;
> }
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
prev parent reply other threads:[~2022-03-31 12:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-31 12:26 [PATCH] hw/char: fix qcode array bounds check in ESCC impl Daniel P. Berrangé
2022-03-31 12:27 ` Peter Maydell [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=CAFEAcA99U6RaM_mh4C-mY1RcEzyJ-+oYED0K5iPQrHCp4D5bHQ@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=berrange@redhat.com \
--cc=marcandre.lureau@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;
as well as URLs for NNTP newsgroup(s).