[PATCH 4.14 180/193] tty: fix out-of-bounds access in tty_driver_lookup_tty()