X Input Method connection is broken --- _XimCountNumberOfAttr() in libX11-1.6.10/modules/im/ximcp/imRmAttr.c enbuged?
before libX11 1.6.10, I can enter Japanese text via X Input Method, using kinput2 as a server, firefox as a client, those are installed on Freebsd 12 using pkg command.
I know changes from 1.6.9 to 1.6.10 includes range checking codes for security fixes, so I suspected some of those changes caused the problem.
_XimCountNumberOfAttr() in libX11-1.6.10/modules/im/ximcp/imRmAttr.c, range checking condition in the while loop
if (len >= (total - min_len)) { return 0; }
should be
if (len > (total - min_len)) { return 0; }
reasoning: assume processing last entry, lenth + min_len == total may hold, so original code exclude valid one as an error, causing X Input Method connection faile.0