Fix a bug where some input clients can't connect to the input server.

FreeBSD bugzilla reference:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248549
This commit is contained in:
matthieu 2020-08-20 19:12:48 +00:00
parent 574495efdc
commit bb74146ca2

View File

@ -1407,7 +1407,7 @@ _XimCountNumberOfAttr(
*names_len = 0;
while (total > min_len) {
len = attr[2];
if (len >= (total - min_len)) {
if (len > (total - min_len)) {
return 0;
}
*names_len += (len + 1);