Fix $regex<n> use-after-free. Bug 2915
[exim.git] / src / src / directory.c
index 3273eb89b066a23f8ed35dbc7f7f0b3f4e5434f0..18902085539c9fa707b878a2f405a6440d150ee3 100644 (file)
@@ -2,8 +2,8 @@
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
+/* Copyright (c) The Exim Maintainers 2010 - 2022 */
 /* Copyright (c) University of Cambridge 1995 - 2009 */
-/* Copyright (c) The Exim Maintainers 2010 - 2018 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 #include "exim.h"
@@ -44,8 +44,8 @@ uschar c = 1;
 struct stat statbuf;
 uschar * path;
 
-if (is_tainted2(name, LOG_MAIN|LOG_PANIC, "Tainted path '%s' for new directory", name))
-  { p = US"create"; path = US name; errno = EACCES; goto bad; }
+if (is_tainted(name)) 
+  { p = US"create"; path = US name; errno = ERRNO_TAINT; goto bad; }
 
 if (parent)
   {