X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=doio.c;h=e19a6f2591a4d7b1d583445782b791991dbc0862;hb=63f2c1e106a2635d888c6b582f4c59b5c0ecc7ee;hp=ea9a71f347494209c0d613e45e92ade28cd4c2dc;hpb=79a0689e17f959bdb246dc37bbbbfeba4c2b3b56;p=p5sagit%2Fp5-mst-13.2.git diff --git a/doio.c b/doio.c index ea9a71f..e19a6f2 100644 --- a/doio.c +++ b/doio.c @@ -1,4 +1,4 @@ -/* $Header: doio.c,v 3.0.1.6 90/03/12 16:30:07 lwall Locked $ +/* $Header: doio.c,v 3.0.1.7 90/03/14 12:26:24 lwall Locked $ * * Copyright (c) 1989, Larry Wall * @@ -6,6 +6,9 @@ * as specified in the README file that comes with the perl 3.0 kit. * * $Log: doio.c,v $ + * Revision 3.0.1.7 90/03/14 12:26:24 lwall + * patch15: commands involving execs could cause malloc arena corruption + * * Revision 3.0.1.6 90/03/12 16:30:07 lwall * patch13: system 'FOO=bar command' didn't invoke sh as it should * @@ -931,6 +934,9 @@ char *cmd; /* see if there are shell metacharacters in it */ + for (s = cmd; *s && isalpha(*s); s++) ; /* catch VAR=val gizmo */ + if (*s == '=') + goto doshell; for (s = cmd; *s; s++) { if (*s != ' ' && !isalpha(*s) && index("$&*(){}[]'\";\\|?<>~`\n",*s)) { if (*s == '\n' && !s[1]) { @@ -942,9 +948,6 @@ char *cmd; return FALSE; } } - for (s = cmd; *s && isalpha(*s); s++) ; /* catch VAR=val gizmo */ - if (*s == '=') - goto doshell; New(402,argv, (s - cmd) / 2 + 2, char*); a = argv;