[PATCH 5.16 163/227] tty: n_tty: do not look ahead for EOL character past the end of the buffer