were two remaining places that still used ";". Though they
weren't of consequence, it's the right thing to do.
*/
if (*(argp+1) == (char *)0) {
*/
if (*(argp+1) == (char *)0) {
- (void)sprintf(buf, "$SHELL -c \"cd;pwd\"");
+ (void)sprintf(buf, "$SHELL -c \"cd&&pwd\"");
}
else {
writesomecmd(buf, BUFSIZ, "cd", "pwd", argp);
}
else {
writesomecmd(buf, BUFSIZ, "cd", "pwd", argp);
* new C99 mandated 'number of chars that would have been written'
*/
/* length checks here and inside the loop allow for the
* new C99 mandated 'number of chars that would have been written'
*/
/* length checks here and inside the loop allow for the
- * trailing ';', trailcmd, '"' and NUL
+ * trailing "&&", trailcmd, '"' and NUL
- int trailln = strlen(trailcmd) + 3;
+ int trailln = strlen(trailcmd) + 4;
if (ln < 0 || ln + trailln > bufsz)
adios((char *)0, "arguments too long");
if (ln < 0 || ln + trailln > bufsz)
adios((char *)0, "arguments too long");
cp += ln;
}
if (*trailcmd) {
cp += ln;
}
if (*trailcmd) {
+ *cp++ = '&'; *cp++ = '&';