Bourne
| Ash
| #!
| find
| ARG_MAX
| Shells
| portability
| permissions
| UUOC
| ancient
| -
| ../Various
| HOME
"$@"
| echo/printf
| set -e
| test
| tty defs
| tty chars
| $()
vs )
| IFS
| using siginfo
| nanosleep
| line charset
| locale
This is a part of the diff of linux/fs/exec.c
between Linux release 0.11 and 0.12.
*** linux-0.11-exec.c 1991-12-01 21:01:01.000000000 +0100
--- linux-0.12-exec.c 1992-01-14 00:36:33.000000000 +0100
[...]
***************
*** 227,243 ****
/*
* This section does the #! interpretation.
* Sorta complicated, but hopefully it will work. -TYT
*/
! char buf[1023], *cp, *interp, *i_name, *i_arg;
unsigned long old_fs;
! strncpy(buf, bh->b_data+2, 1022);
brelse(bh);
iput(inode);
! buf[1022] = '\0';
if (cp = strchr(buf, '\n')) {
*cp = '\0';
for (cp = buf; (*cp == ' ') || (*cp == '\t'); cp++);
}
if (!cp || *cp == '\0') {
--- 252,268 ----
/*
* This section does the #! interpretation.
* Sorta complicated, but hopefully it will work. -TYT
*/
! char buf[128], *cp, *interp, *i_name, *i_arg;
unsigned long old_fs;
! strncpy(buf, bh->b_data+2, 127);
brelse(bh);
iput(inode);
! buf[127] = '\0';
if (cp = strchr(buf, '\n')) {
*cp = '\0';
for (cp = buf; (*cp == ' ') || (*cp == '\t'); cp++);
}
if (!cp || *cp == '\0') {