Thanks Nathan (pooryorick) for finding and minimalistic fix.
I've amended with more extensive fix replacing strcpy with memcpy (additionally should avoid segfault by overwrite if string representation would be possibly broken, e. g. without NTS 0-byte) and extended the test-cases to cover exactly this issue.

So fixed now in 2.8 and trunk, thus close.