hw/char: fix qcode array bounds check in ESCC impl

There was an off-by-1 in the qcode conversion array bounds
check.

Fixes: e709a61a8f
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>
This commit is contained in:
Daniel P. Berrangé 2022-03-31 13:24:14 +01:00
parent c6b310b37c
commit 9aaf11e7f2
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}