Thanks to jasonharper's comment I was able to solve the problem: The string for the name has to end with a null caracter that counts into the length of the string. That caracter needs to be appended.