diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2026-05-23 16:35:52 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2026-05-23 16:35:52 +0000 |
| commit | dc1d831434bc470550b0d136c28143f7ea458d7d (patch) | |
| tree | 4f36fa5be9df4481e6f0f3404dd421c266d18c22 | |
| parent | 2d91d5e550b1876c4d61f56ec2eccfb311e2c0b3 (diff) | |
| download | tipidee-dc1d831434bc470550b0d136c28143f7ea458d7d.tar.gz | |
adding the terminating \0 should be a part of the sarealpath() line
| -rw-r--r-- | src/config/tipidee-config-preprocess.c | 3 |
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) |
