diff -urN a/lib/porg-log/log.c b/lib/porg-log/log.c
--- a/lib/porg-log/log.c	2015-11-06 12:43:07.000000000 +0200
+++ b/lib/porg-log/log.c	2022-04-22 13:52:48.000000000 +0200
@@ -98,12 +98,14 @@
 	/* relative to CWD */
 	else if (fd < 0) {
 		strncpy(abs_path, cwd, PORG_BUFSIZE - 1);
+		abs_path[PORG_BUFSIZE - 1] = 0;
 		strncat(abs_path, "/", PORG_BUFSIZE - strlen(abs_path) - 1);
 		strncat(abs_path, path, PORG_BUFSIZE - strlen(abs_path) - 1);
 	}
 	/* relative to directory fd */
 	else if (fchdir(fd) == 0 && getcwd(aux, PORG_BUFSIZE) && chdir(cwd) == 0) {
 		strncpy(abs_path, aux, PORG_BUFSIZE - 1);
+		abs_path[PORG_BUFSIZE - 1] = 0;
 		strncat(abs_path, "/", PORG_BUFSIZE - strlen(abs_path) - 1);
 		strncat(abs_path, path, PORG_BUFSIZE - strlen(abs_path) - 1);
 	}
