Fix segfault -- buffer didn't have space for null-byte string terminator.