mirror of
https://github.com/opnsense/src.git
synced 2026-04-14 13:57:02 -04:00
Proper upper limit for mousechar start is UCHAR_MAX - 3, not UCHAR_MAX
PR: 24437 Submitted by: Cejka Rudolf <cejkar@dcse.fee.vutbr.cz>
This commit is contained in:
parent
ad6931f954
commit
e4ef2fa234
1 changed files with 2 additions and 2 deletions
|
|
@ -488,8 +488,8 @@ set_mouse_char(char *arg)
|
|||
long l;
|
||||
|
||||
l = strtol(arg, NULL, 0);
|
||||
if ((l < 0) || (l > UCHAR_MAX)) {
|
||||
warnx("argument to -M must be 0 through %d", UCHAR_MAX);
|
||||
if ((l < 0) || (l > UCHAR_MAX - 3)) {
|
||||
warnx("argument to -M must be 0 through %d", UCHAR_MAX - 3);
|
||||
return;
|
||||
}
|
||||
mouse.operation = MOUSE_MOUSECHAR;
|
||||
|
|
|
|||
Loading…
Reference in a new issue