From owner-freebsd-current@FreeBSD.ORG Sat Jun 18 18:01:20 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 8347E16A41C for ; Sat, 18 Jun 2005 18:01:20 +0000 (GMT) (envelope-from morten@oslonett.no) Received: from smarthost2.tiscali.dk (smarthost2.tiscali.dk [62.79.79.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DE5F43D48 for ; Sat, 18 Jun 2005 18:01:19 +0000 (GMT) (envelope-from morten@oslonett.no) Received: from cpmail.dk.tiscali.com (mail.tiscali.dk [212.54.64.159]) by smarthost2.tiscali.dk (8.13.1/8.13.1) with ESMTP id j5II1I5M083052 for ; Sat, 18 Jun 2005 20:01:18 +0200 (CEST) (envelope-from morten@oslonett.no) Received: from [10.10.10.7] (82.164.251.12) by cpmail.dk.tiscali.com (6.7.018) id 42B209C3000076A0 for freebsd-current@freebsd.org; Sat, 18 Jun 2005 20:01:18 +0200 Message-ID: <42B46171.2070606@oslonett.no> Date: Sat, 18 Jun 2005 20:01:21 +0200 From: Morten Johansen User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050425) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [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 18:01:20 -0000 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; /*