Same as [Tcl patch #3048354], but it turns out that Tk uses the same pattern as well.
Fixed on HEAD
proposed fix (same, but for Tk 8.5)
proposed fix (same, but for Tk 8.4)
Looks like you missed a spot -- see #3164879 for details.
Good catch! Thanks!
Backported the srccpy -> memcpy change to 8.5 and 8.4, not the structure
change in order to prevent repeating anything like #3164879.