[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hash-bang line length

From: Greg Wooledge
Subject: Re: Hash-bang line length
Date: Wed, 13 Jan 2016 08:19:02 -0500
User-agent: Mutt/

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]