Rewrite the loops which extract the interpreter name and arguments out
authorMatthew Dillon <dillon@dragonflybsd.org>
Fri, 25 Feb 2005 08:49:10 +0000 (08:49 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Fri, 25 Feb 2005 08:49:10 +0000 (08:49 +0000)
commit4c9b54ff139d49a7d650a8eb929e5645b135c728
tree44b8740adcdb39b3bbad157b4685ab3340405b6c
parent5480c2a2c5ca114842c1753dde2063c26b20e863
Rewrite the loops which extract the interpreter name and arguments out
of the #! line for a shell script.  The loop was improperly handling a
missing newline by scanning past the end of the buffer, resulting in a panic.

Reported-by: Garance A Drosihn <drosih@rpi.edu>
sys/kern/imgact_shell.c