51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
#if HAVE_CONFIG_H
-# include "../config.h"
+# include "config.h"
#endif
#include <sys/types.h>
int result = vsnprintf(buf, sizeof buf, fmt, ap);
if(result < 0)
exit(xalloc_exit_failure);
+ buf[sizeof buf - 1] = 0;
*strp = xstrdup(buf);
#else
int result = vasprintf(strp, fmt, ap);