n_tty: Fix unsafe update of available buffer space