Serial mouse, microtouch, and modem: Add some more sanity checks.

This commit is contained in:
OBattler
2024-09-20 13:36:01 +02:00
parent 6d5fd97cda
commit ea878410b0
3 changed files with 20 additions and 10 deletions

View File

@@ -322,6 +322,8 @@ void
mtouch_write_to_host(void *priv)
{
mouse_microtouch_t *dev = (mouse_microtouch_t *) priv;
if (dev->serial == NULL)
goto no_write_to_machine;
if ((dev->serial->type >= SERIAL_16550) && dev->serial->fifo_enabled) {
if (fifo_get_full(dev->serial->rcvr_fifo)) {
goto no_write_to_machine;