Testsuite: fix 0903
authorHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Tue, 27 Dec 2016 22:07:55 +0000 (23:07 +0100)
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Wed, 28 Dec 2016 09:56:13 +0000 (10:56 +0100)
src/src/readconf.c
test/confs/0903
test/scripts/0000-Basic/0903
test/stdout/0903 [new file with mode: 0644]

index 46dc7ce..21328bd 100644 (file)
@@ -1178,6 +1178,7 @@ for (;;)
         int offset = 0;
         int size = 0;
         ss = string_append(NULL, &size, &offset, 3, config_directory, "/", ss);
         int offset = 0;
         int size = 0;
         ss = string_append(NULL, &size, &offset, 3, config_directory, "/", ss);
+        ss[offset] = '\0';  /* string_append() does not zero terminate the string! */
         }
 
     if (include_if_exists != 0 && (Ustat(ss, &statbuf) != 0)) continue;
         }
 
     if (include_if_exists != 0 && (Ustat(ss, &statbuf) != 0)) continue;
index 6005468..017424e 100644 (file)
@@ -1 +1 @@
-.include 0903./aaa
+.include confs/0903./aaa
index a29e949..1bd510a 100644 (file)
@@ -1,2 +1,2 @@
 # Test different variants of .includes
 # Test different variants of .includes
-exim
+exim -bP config
diff --git a/test/stdout/0903 b/test/stdout/0903
new file mode 100644 (file)
index 0000000..a7bda45
--- /dev/null
@@ -0,0 +1,7 @@
+# Exim Configuration (X)
+# 1 "TESTSUITE/test-config"
+# 1 "TESTSUITE/test-config"
+# 1 "TESTSUITE/confs/0903./aaa"
+# 1 "TESTSUITE/confs/0903./aaa"
+# 1 "TESTSUITE/confs/0903./aaa"
+# 1 "TESTSUITE/test-config"