fixed error displayed on RHEL (but not Debian) caused by string without null-termination, which caused extra char to be concatented to string buffer