Fix input clients connecting to server

Fix a bug where some input clients can't connect to the input server.
This fixes #117.

FreeBSD bugzilla reference:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248549

Signed-off-by: Niclas Zeising <zeising@daemonic.se>
This commit is contained in:
Niclas Zeising 2020-08-11 13:44:38 +02:00 committed by Alan Coopersmith
parent 6dd618e5ea
commit d15c24c8b4

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);