bug-bash
[Top][All Lists]
Advanced

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

Re: Potential Bash Script Vulnerability


From: Kerin Millar
Subject: Re: Potential Bash Script Vulnerability
Date: Mon, 08 Apr 2024 09:59:13 +0100
User-agent: Cyrus-JMAP/3.11.0-alpha0-368-gc733b1d8df-fm-20240402.001-gc733b1d8

On Mon, 8 Apr 2024, at 5:29 AM, John Passaro wrote:
> if you wanted this for your script - read all then start semantics, as 
> opposed to read-as-you-execute - would it work to rewrite yourself 
> inside a function?
>
> function main() { ... } ; main

Mostly, yes. My initial post in this thread spoke of it. It isn't a panacea 
because a sufficiently large compound command can cause bash to run out of 
stack space. In that case, all one can do is to break the script down further 
into additional, smaller, functions.

-- 
Kerin Millar



reply via email to

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