aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2022-03-31 13:24:14 +0100
committerDaniel P. Berrangé <berrange@redhat.com>2022-04-26 16:12:26 +0100
commit9aaf11e7f2b5487b684e900cf164f0aef25f72ab (patch)
tree76254dba9844798c5cbd6df16faca7301c29133e /hw
parentc6b310b37c3e3f898d56955646e6d49c60ef7a63 (diff)
hw/char: fix qcode array bounds check in ESCC impl
There was an off-by-1 in the qcode conversion array bounds check. Fixes: e709a61a8fe1076a487376fd657544418a38ba06 Reported-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/char/escc.c2
1 files changed, 1 insertions, 1 deletions
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;
}