[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: [ID 20000121.005] System command starting with environment



At 13:21 -0500 2000-01-22, Ilya Zakharevich wrote:
>Dominic Dunlop writes:
>  > --- perl5.005_03/doio.c-as_received	Sat Mar 27 17:57:24 1999
>  > +++ perl5.005_03/doio.c	Sat Jan 22 18:10:15 2000
>  > @@ -1069,7 +1069,7 @@ do_exec(char *cmd)
>  >       if (strnEQ(cmd,"exec",4) && isSPACE(cmd[4]))
>  >   	goto doshell;
>  >
>  > -    for (s = cmd; *s && isALPHA(*s); s++) ;	/* catch 
>VAR=val gizmo */
>  > +    for (s = cmd; *s && isALNUM_LC(*s); s++) ;	/* catch 
>VAR=val gizmo */
>  >       if (*s == '=')
>  >   	goto doshell;
>
>Is not LC locale?  Then this is not a fix (set LANG=C), and is a very
>dangerous modification (putting locale-dependencies in the core
>operation).  What about isWORD (sp?)?

Good point.  There's not an isWORD(), but plain isALNUM() seems to 
suit, so I should have said:

--- perl5.005_03/doio.c-as_received	Sat Mar 27 17:57:24 1999
+++ perl5.005_03/doio.c	Sat Jan 22 18:10:15 2000
@@ -1069,7 +1069,7 @@ do_exec(char *cmd)
      if (strnEQ(cmd,"exec",4) && isSPACE(cmd[4]))
  	goto doshell;

-    for (s = cmd; *s && isALPHA(*s); s++) ;	/* catch VAR=val gizmo */
+    for (s = cmd; *s && isALNUM(*s); s++) ;	/* catch VAR=val gizmo */
      if (*s == '=')
  	goto doshell;


-- 
Dominic Dunlop


Follow-Ups from:
Dominic Dunlop <domo@computer.org>
References to:
Ilya Zakharevich <ilya@math.ohio-state.edu>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]