Fix $regex<n> use-after-free. Bug 2915
[exim.git] / src / src / perl.c
index 6966d73b5adf96d446e376f2e9936dc74b85e148..f07ee2e2719910eaaa9b3a17868460cd2c3dfbb3 100644 (file)
@@ -2,6 +2,7 @@
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
+/* Copyright (c) The Exim Maintainers 1999 - 2022 */
 /* Copyright (c) 1998 Malcolm Beattie */
 
 /* Modified by PH to get rid of the "na" usage, March 1999.
 /* See the file NOTICE for conditions of use and distribution. */
 
 #include <assert.h>
+
+#define HINTSDB_H
+#define DBFUNCTIONS_H
+
 #include "exim.h"
 
 #define EXIM_TRUE TRUE
@@ -61,7 +66,7 @@ XS(xs_expand_string)
   ST(0) = sv_newmortal();
   if (str != NULL)
     sv_setpv(ST(0), CCS  str);
-  else if (!expand_string_forcedfail)
+  else if (!f.expand_string_forcedfail)
     croak("syntax error in Exim::expand_string argument: %s",
       expand_string_message);
 }