diff --git a/sys/compat/common/tty_43.c b/sys/compat/common/tty_43.c index 992053059e19..131d349d47ae 100644 --- a/sys/compat/common/tty_43.c +++ b/sys/compat/common/tty_43.c @@ -220,10 +220,10 @@ compat_43_ttioctl(struct tty *tp, u_long com, void *data, int flag, case TIOCLBIC: case TIOCLSET: { struct termios term; - int argbits, flags; + unsigned argbits, flags; argbits = *(int *)data; - if (argbits < 0) + if (argbits != (argbits & 0xffff)) return EINVAL; mutex_spin_enter(&tty_lock);