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 46dc7ced2939b33158dbd5b569616cd07b479e93..21328bd3a7ed3659c7c51db2cce5761ea8b89728 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 6005468c22c77ed06aed582974cec6ef76354562..017424e24a40ebdf098e663b963ab6b646fcfe87 100644 (file)
@@ -1 +1 @@
-.include 0903./aaa
+.include confs/0903./aaa
index a29e949493e947e8b89286c0101c80539b46be43..1bd510ae34c1e09eb4ab8d2cb8090408a25a35b8 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"