Implement a fix from OpenBSD 5.6-stable:

Protocol handling issues in X Window System servers
One year after Ilja van Sprundel, discovered and reported a large number
of issues in the way the X server code base handles requests from X
clients,
they have been fixed.