[PULL 2/3] hw/char: fix qcode array bounds check in ESCC impl