From owner-freebsd-current@FreeBSD.ORG Sat Jun 18 19:16:33 2005 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 44ED516A41C for ; Sat, 18 Jun 2005 19:16:33 +0000 (GMT) (envelope-from gad@FreeBSD.org) Received: from smtp4.server.rpi.edu (smtp4.server.rpi.edu [128.113.2.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C6E043D49 for ; Sat, 18 Jun 2005 19:16:32 +0000 (GMT) (envelope-from gad@FreeBSD.org) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp4.server.rpi.edu (8.13.0/8.13.0) with ESMTP id j5IJGSim011736; Sat, 18 Jun 2005 15:16:31 -0400 Mime-Version: 1.0 Message-Id: In-Reply-To: <42B46171.2070606@oslonett.no> References: <42B46171.2070606@oslonett.no> Date: Sat, 18 Jun 2005 15:16:27 -0400 To: Morten Johansen , freebsd-current@FreeBSD.org From: Garance A Drosehn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-CanItPRO-Stream: default X-RPI-SA-Score: undef - spam-scanning disabled X-Scanned-By: CanIt (www . canit . ca) on 128.113.2.4 Cc: Subject: Re: [patch] panic executing shell-script X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jun 2005 19:16:33 -0000 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 >@@ -161,7 +161,7 @@ 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@gilead.netel.rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA