From dc1d831434bc470550b0d136c28143f7ea458d7d Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 23 May 2026 16:35:52 +0000 Subject: adding the terminating \0 should be a part of the sarealpath() line --- src/config/tipidee-config-preprocess.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/config/tipidee-config-preprocess.c b/src/config/tipidee-config-preprocess.c index 5b79288..bda7acf 100644 --- a/src/config/tipidee-config-preprocess.c +++ b/src/config/tipidee-config-preprocess.c @@ -153,7 +153,7 @@ static void includefromhere (char const *file) unsigned char state = 0 ; if (!stralloc_catb(&namesa, "\004", 1)) dienomem() ; - if (sarealpath(&namesa, file) == -1) + if (sarealpath(&namesa, file) == -1 || !stralloc_0(&namesa)) { cmd = errno ; if (sagetcwd(&sa) == -1) strerr_diefu1sys(111, "getcwd") ; @@ -161,7 +161,6 @@ static void includefromhere (char const *file) errno = cmd ; strerr_dief4sys(111, "from directory ", sa.s + sabase, ": unable to realpath ", file) ; } - if (!stralloc_0(&namesa)) dienomem() ; if (avltree_search(&namemap, namesa.s + namesabase + 1, &d)) { if (namesa.s[d] & 0x04) -- cgit v1.3.1