There is no guarantee about what is after the first null byte
in ordinary C strings. When string buffers are read, the
current code fails when garbage is sent after the first null byte.
This patch causes everything after the first byte to be discarded.