diff options
author | Zefram <zefram@fysh.org> | 2017-12-06 21:27:15 +0000 |
---|---|---|
committer | Zefram <zefram@fysh.org> | 2017-12-14 22:48:30 +0000 |
commit | 282fc0b3cc2439f69587d980b62bef7f5d5bdfef (patch) | |
tree | 6dc6abf858b4903d0adb99d6309a74f84ebf7782 /intrpvar.h | |
parent | e135ff695231a81e2a70a739e8d813525432fd4d (diff) | |
download | perl-282fc0b3cc2439f69587d980b62bef7f5d5bdfef.tar.gz |
make exec keep its argument list more reliably
Bits of exec code were putting the constructed commands into globals
PL_Argv and PL_Cmd, which could then be clobbered by reentrancy.
These are only global in order to manage their freeing, but that's
better managed by using the scope stack. So replace them with automatic
variables, with ENTER/SAVEFREEPV/LEAVE to free the memory. Also copy
the strings acquired from SVs, to avoid magic clobbering the buffers of
SVs already read. Fixes [perl #129888].
Diffstat (limited to 'intrpvar.h')
-rw-r--r-- | intrpvar.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/intrpvar.h b/intrpvar.h index d88628a094..006880a37c 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -456,8 +456,6 @@ PERLVARI(I, curcopdb, COP *, NULL) PERLVAR(I, filemode, int) /* so nextargv() can preserve mode */ PERLVAR(I, lastfd, int) /* what to preserve mode on */ PERLVAR(I, oldname, char *) /* what to preserve mode on */ -PERLVAR(I, Argv, const char **) /* stuff to free from do_aexec, vfork safe */ -PERLVAR(I, Cmd, char *) /* stuff to free from do_aexec, vfork safe */ /* Elements in this array have ';' appended and are injected as a single line into the tokeniser. You can't put any (literal) newlines into any program you stuff in into this array, as the point where it's injected is expecting |