DragonFly BSD
DragonFly commits List (threaded) for 2005-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/sys/kern imgact_shell.c


To: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
From: Maxim Sobolev <sobomax@xxxxxxxxxxx>
Date: Fri, 25 Feb 2005 12:18:24 +0200

Into my FreeBSD fix I've also included '\0' into the list of possible line terminators. Previously '\0' has been considered as "ordinary" character, neither token separator nor line separator, which is probably incorrect. Also I think your patch is partially incorrect, since it ignores situation when interpreter string exceeds MAXSHELLCMDLEN - it just truncates name in this case.

-Maxim

Matthew Dillon wrote:
dillon 2005/02/25 00:49:10 PST

DragonFly src repository

Modified files:
sys/kern imgact_shell.c Log:
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@xxxxxxx>
Revision Changes Path
1.5 +27 -20 src/sys/kern/imgact_shell.c



http://www.dragonflybsd.org/cvsweb/src/sys/kern/imgact_shell.c.diff?r1=1.4&r2=1.5&f=u



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]