From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#22354: Hash-bang line length Date: Wed, 13 Jan 2016 18:41:41 +0100 Message-ID: <87vb6x2x7u.fsf__11429.6058346101$1452706946$gmane$org@gnu.org> References: <87lh7t7p4w.fsf@gnu.org> <20160113131902.GU27325@eeg.ccf.org> <87y4bt60zb.fsf@gnu.org> <56967976.2080908@case.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJPQq-0005TY-Rn for bug-guix@gnu.org; Wed, 13 Jan 2016 12:42:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJPQo-0002nt-Cs for bug-guix@gnu.org; Wed, 13 Jan 2016 12:42:04 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:60285) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJPQo-0002no-9f for bug-guix@gnu.org; Wed, 13 Jan 2016 12:42:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aJPQo-0007tV-4v for bug-guix@gnu.org; Wed, 13 Jan 2016 12:42:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <56967976.2080908@case.edu> (Chet Ramey's message of "Wed, 13 Jan 2016 11:21:10 -0500") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Chet Ramey Cc: Greg Wooledge , bug-bash@gnu.org, 22354@debbugs.gnu.org Chet Ramey skribis: > On 1/13/16 8:52 AM, Ludovic Court=C3=A8s wrote: >> Greg Wooledge skribis: >>=20 >>> On Wed, Jan 13, 2016 at 11:25:03AM +0100, Ludovic Court=C3=A8s wrote: >>>> Hello, >>>> >>>> The ???READ_SAMPLE_BUF??? macro in execute_cmd.c reads at most 80 byte= s from >>>> the hash-bang line. This is less than the already-small 128-byte limit >>>> in the Linux kernel=C2=B9 and can quite easily be hit=C2=B2. >>> >>> That's actually much bigger than one expects for shebang handling on >>> any traditional Unix system. >>=20 >> Sure, but the fact that it=E2=80=99s smaller than that of the kernel Lin= ux is >> problematic: when a hash-bang line > 127 chars is encountered, =E2=80=98= execve=E2=80=99 >> fails with ENOENT, so Bash=E2=80=99s fallback code is executed, fails as= well, > > No. Since the execve fails with ENOENT, bash just prints an error > message. Right, sorry for the confusion. >> but it prints a misleading error message with an even more truncated >> hash-bang line. > > Again, it's only a cosmetic issue. I don't have a problem with increasing > the buffer size, but let's not pretend it's anything but that. Exactly. I was talking about the =E2=80=9Cbad interpreter=E2=80=9D error m= essage specifically. Ludo=E2=80=99.