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 14:52:08 +0100 Message-ID: <87y4bt60zb.fsf__1083.29105792127$1452693205$gmane$org@gnu.org> References: <87lh7t7p4w.fsf@gnu.org> <20160113131902.GU27325@eeg.ccf.org> 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]:35739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJLrF-0000kC-F6 for bug-guix@gnu.org; Wed, 13 Jan 2016 08:53:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJLrC-0005ZM-A9 for bug-guix@gnu.org; Wed, 13 Jan 2016 08:53:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:59685) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJLrC-0005ZI-6o for bug-guix@gnu.org; Wed, 13 Jan 2016 08:53:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aJLrC-0005sU-1e for bug-guix@gnu.org; Wed, 13 Jan 2016 08:53:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20160113131902.GU27325@eeg.ccf.org> (Greg Wooledge's message of "Wed, 13 Jan 2016 08:19:02 -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: Greg Wooledge Cc: 22354@debbugs.gnu.org, bug-bash@gnu.org Greg Wooledge skribis: > On Wed, Jan 13, 2016 at 11:25:03AM +0100, Ludovic Court=C3=A8s wrote: >> Hello, >>=20 >> The ???READ_SAMPLE_BUF??? macro in execute_cmd.c reads at most 80 bytes = 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. Sure, but the fact that it=E2=80=99s smaller than that of the kernel Linux = is problematic: when a hash-bang line > 127 chars is encountered, =E2=80=98exe= cve=E2=80=99 fails with ENOENT, so Bash=E2=80=99s fallback code is executed, fails as we= ll, but it prints a misleading error message with an even more truncated hash-bang line. Ludo=E2=80=99.