aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2026-05-23 16:35:52 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2026-05-23 16:35:52 +0000
commitdc1d831434bc470550b0d136c28143f7ea458d7d (patch)
tree4f36fa5be9df4481e6f0f3404dd421c266d18c22
parent2d91d5e550b1876c4d61f56ec2eccfb311e2c0b3 (diff)
downloadtipidee-dc1d831434bc470550b0d136c28143f7ea458d7d.tar.gz
adding the terminating \0 should be a part of the sarealpath() line
-rw-r--r--src/config/tipidee-config-preprocess.c3
1 files changed, 1 insertions, 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)