diff options
Diffstat (limited to 'src/src/perl.c')
-rw-r--r-- | src/src/perl.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/src/perl.c b/src/src/perl.c index 543b5d27d..fbe9ee842 100644 --- a/src/src/perl.c +++ b/src/src/perl.c @@ -13,6 +13,7 @@ /* This Perl add-on can be distributed under the same terms as Exim itself. */ /* See the file NOTICE for conditions of use and distribution. */ +#include <assert.h> #include "exim.h" #define EXIM_TRUE TRUE @@ -95,11 +96,17 @@ static void xs_init(pTHX) uschar * init_perl(uschar *startup_code) { - static int argc = 2; - static char *argv[3] = { "exim-perl", "/dev/null", 0 }; + static int argc = 1; + static char *argv[4] = { "exim-perl" }; SV *sv; STRLEN len; + if (opt_perl_taintmode) argv[argc++] = "-T"; + argv[argc++] = "/dev/null"; + argv[argc] = 0; + + assert(sizeof(argv)/sizeof(argv[0]) > argc); + if (interp_perl) return 0; interp_perl = perl_alloc(); perl_construct(interp_perl); |