From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Wooledge Subject: bug#22354: Hash-bang line length Date: Wed, 13 Jan 2016 08:19:02 -0500 Message-ID: <20160113131902.GU27325__6273.15905080668$1452693469$gmane$org@eeg.ccf.org> References: <87lh7t7p4w.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJLLJ-0000aG-Cj for bug-guix@gnu.org; Wed, 13 Jan 2016 08:20:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJLLF-0006IJ-Uy for bug-guix@gnu.org; Wed, 13 Jan 2016 08:20:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:59679) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJLLF-0006I7-Rm for bug-guix@gnu.org; Wed, 13 Jan 2016 08:20:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aJLLF-00058J-O5 for bug-guix@gnu.org; Wed, 13 Jan 2016 08:20:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: Content-Disposition: inline In-Reply-To: <87lh7t7p4w.fsf@gnu.org> 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 22354@debbugs.gnu.org, bug-bash@gnu.org On Wed, Jan 13, 2016 at 11:25:03AM +0100, Ludovic Courtès wrote: > Hello, > > 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¹ and can quite easily be hit². That's actually much bigger than one expects for shebang handling on any traditional Unix system. http://www.in-ulm.de/~mascheck/various/shebang/ is by far the most authoritative source on the topic, and it shows limits of 16 to 32 bytes for the first implementations. Later, it mentions that Linux's implementation started at 1022, then was changed to 127.