[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash core dumps doing glob pattern on long string
From: |
Martin D Kealey |
Subject: |
Re: bash core dumps doing glob pattern on long string |
Date: |
Tue, 11 Oct 2022 15:23:07 +1000 |
On Sun, 9 Oct 2022 at 18:07, Phi Debian <phi.debian@gmail.com> wrote:
> I was looking at a bug on ksh93 that is "core dumps doing glob pattern on
> long string" and it happen that bash
> suffer the same.
>
> $ [[ $(printf '%0100000d' 0) == +(0) ]]
>
> I see 3 way of fixing this
>
> 1) [...] string should be limited to PATH_MAX [...]
> 2) [...] have a fix recursion deep level [...]
> 3) [...] Implement a stack deep check in the recursion [...]
4) compile globs into state machines, the same way that regexes get
compiled, so that they can be matched without needing any recursion.
-Martin
Re: bash core dumps doing glob pattern on long string,
Martin D Kealey <=
- Re: bash core dumps doing glob pattern on long string, Phi Debian, 2022/10/11
- Re: bash core dumps doing glob pattern on long string, Martin D Kealey, 2022/10/11
- Re: bash core dumps doing glob pattern on long string, Phi Debian, 2022/10/11
- Re: bash core dumps doing glob pattern on long string, Koichi Murase, 2022/10/11
- Re: bash core dumps doing glob pattern on long string, Greg Wooledge, 2022/10/11
- Re: bash core dumps doing glob pattern on long string, Koichi Murase, 2022/10/11
- Re: bash core dumps doing glob pattern on long string, Dennis Williamson, 2022/10/11