components/ksh93/patches/CR7128313.patch
author Rohith Ramesh Bangalore India <rohith.ramesh@oracle.com>
Mon, 18 Feb 2013 01:17:35 -0600
branchs11u1-sru
changeset 2497 43014bd244d4
permissions -rw-r--r--
15765108 SUNBT7128313 ksh93 executes subshell with bad path to command
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2497
43014bd244d4 15765108 SUNBT7128313 ksh93 executes subshell with bad path to command
Rohith Ramesh Bangalore India <rohith.ramesh@oracle.com>
parents:
diff changeset
     1
--- a/src/cmd/ksh93/sh/path.c
43014bd244d4 15765108 SUNBT7128313 ksh93 executes subshell with bad path to command
Rohith Ramesh Bangalore India <rohith.ramesh@oracle.com>
parents:
diff changeset
     2
+++ b/src/cmd/ksh93/sh/path.c
43014bd244d4 15765108 SUNBT7128313 ksh93 executes subshell with bad path to command
Rohith Ramesh Bangalore India <rohith.ramesh@oracle.com>
parents:
diff changeset
     3
@@ -1761,6 +1761,7 @@
43014bd244d4 15765108 SUNBT7128313 ksh93 executes subshell with bad path to command
Rohith Ramesh Bangalore India <rohith.ramesh@oracle.com>
parents:
diff changeset
     4
 	char *ptr;
43014bd244d4 15765108 SUNBT7128313 ksh93 executes subshell with bad path to command
Rohith Ramesh Bangalore India <rohith.ramesh@oracle.com>
parents:
diff changeset
     5
 	if(!pp)
43014bd244d4 15765108 SUNBT7128313 ksh93 executes subshell with bad path to command
Rohith Ramesh Bangalore India <rohith.ramesh@oracle.com>
parents:
diff changeset
     6
 		return(NULL);
43014bd244d4 15765108 SUNBT7128313 ksh93 executes subshell with bad path to command
Rohith Ramesh Bangalore India <rohith.ramesh@oracle.com>
parents:
diff changeset
     7
+	pp->shp->last_table = 0;
43014bd244d4 15765108 SUNBT7128313 ksh93 executes subshell with bad path to command
Rohith Ramesh Bangalore India <rohith.ramesh@oracle.com>
parents:
diff changeset
     8
 	path_nextcomp(pp->shp,pp,nv_name(np),pp);
43014bd244d4 15765108 SUNBT7128313 ksh93 executes subshell with bad path to command
Rohith Ramesh Bangalore India <rohith.ramesh@oracle.com>
parents:
diff changeset
     9
 	ptr = stakfreeze(0);
43014bd244d4 15765108 SUNBT7128313 ksh93 executes subshell with bad path to command
Rohith Ramesh Bangalore India <rohith.ramesh@oracle.com>
parents:
diff changeset
    10
 	return(ptr+PATH_OFFSET);