Re: [patch] panic executing shell-script

From: Garance A Drosehn <gad_at_FreeBSD.org>
Date: Sat, 18 Jun 2005 15:16:27 -0400
At 8:01 PM +0200 6/18/05, Morten Johansen wrote:
>Hi -current,
>
>When executing a shell-script where interpreter-name has 2 or more
>trailing whitespace, kernel panics.
>E.g. bin/jetty.sh from port www/jetty.
>
>Fix:
>
>--- imgact_shell.c      Thu Jun  9 02:27:02 2005
>+++ imgact_shell.c.mj   Sat Jun 18 19:33:00 2005
>_at__at_ -161,7 +161,7 _at__at_ exec_shell_imgact(imgp)
>        while (ihp < maxp && ((*ihp != '\n') && (*ihp != '\0')))
>                ihp++;
>        opte = ihp;
>-       while (--ihp > interpe && ((*ihp == ' ') || (*ihp == '\t')))
>+       while (--ihp > optb && ((*ihp == ' ') || (*ihp == '\t')))
>                opte = ihp;
>
>        /*

That looks like my fault.  I'll look into it.  Thanks for the
report.

-- 
Garance Alistair Drosehn     =      gad_at_gilead.netel.rpi.edu
Senior Systems Programmer               or   gad_at_FreeBSD.org
Rensselaer Polytechnic Institute;             Troy, NY;  USA
Received on Sat Jun 18 2005 - 17:16:33 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:37 UTC