diff -ru tk8.6/macosx/tkMacOSXWm.h tk8.6-patched/macosx/tkMacOSXWm.h
--- tk8.6/macosx/tkMacOSXWm.h	2017-04-06 18:11:56.000000000 +0200
+++ tk8.6-patched/macosx/tkMacOSXWm.h	2017-04-08 15:03:44.000000000 +0200
@@ -29,7 +29,7 @@
 				 * same top-level window, or NULL for end of
 				 * list. */
     Tcl_Interp *interp;		/* Interpreter in which to invoke command. */
-    char command[4];		/* Tcl command to invoke when a client message
+    char command[];		/* Tcl command to invoke when a client message
 				 * for this protocol arrives. The actual size
 				 * of the structure varies to accommodate the
 				 * needs of the actual command. THIS MUST BE
@@ -37,7 +37,7 @@
 } ProtocolHandler;
 
 #define HANDLER_SIZE(cmdLength) \
-((unsigned) (sizeof(ProtocolHandler) - 3 + cmdLength))
+((unsigned) (sizeof(ProtocolHandler) + cmdLength + 1))
 
 /*
  * A data structure of the following type holds window-manager-related
