expand
[users/heiko/exim.git] / src / src / expand.c
index 8a571b2d905c6ed4bdf6a35c4a8ef6b8aa2a9a4b..e0b94e23744a47b65c6c2735526c1f8ef2341483 100644 (file)
@@ -4485,13 +4485,13 @@ DEBUG(D_expand)
 f.expand_string_forcedfail = FALSE;
 expand_string_message = US"";
 
-if (is_tainted(string))
+{ uschar *m;
+if (m = is_tainted2(string, LOG_MAIN|LOG_PANIC, "Tainted string '%s' in expansion", s))
   {
-  expand_string_message =
-    string_sprintf("attempt to expand tainted string '%s'", s);
-  log_write(0, LOG_MAIN|LOG_PANIC, "%s", expand_string_message);
+  expand_string_message = m;
   goto EXPAND_FAILED;
   }
+}
 
 while (*s)
   {