summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel P. Berrangé2022-03-31 14:24:14 +0200
committerDaniel P. Berrangé2022-04-26 17:12:26 +0200
commit9aaf11e7f2b5487b684e900cf164f0aef25f72ab (patch)
tree76254dba9844798c5cbd6df16faca7301c29133e
parentsoftmmu: remove deprecated --enable-fips option (diff)
downloadqemu-9aaf11e7f2b5487b684e900cf164f0aef25f72ab.tar.gz
qemu-9aaf11e7f2b5487b684e900cf164f0aef25f72ab.tar.xz
qemu-9aaf11e7f2b5487b684e900cf164f0aef25f72ab.zip
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>
-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;
}