Radoslav Kolev wrote:
>On 12/29/22 3:45 PM, Ron Yorston wrote:
>> Both ash and hush segfault when asked to evaluate ${0::0/0~09J}.
>
>is there some problem with this patch or another reason it's not applied
>yet? Or it just slipped trough the cracks? If so please consider
>applying it.
Denys
On 12/29/22 3:45 PM, Ron Yorston wrote:
Both ash and hush segfault when asked to evaluate ${0::0/0~09J}.
The stack for integer values in the arithmetic code was too small:
'09J' results in three integers. The leading zero starts an octal
number but '9' isn't an octal digit so '0', '9' and the
Sorry for missing your fix for so long.
I would like to avoid having numstack[] too large,
so I'm adding some code to bail out early if we see
a number immediately followed by a number or a name,
which is never valid.
Thus, the current allocation will not be overflowed.
Please try current git.
Ron Yorston wrote in
<63ad9a0f.mqrbkx7zm8pqj639%...@pobox.com>:
|Both ash and hush segfault when asked to evaluate ${0::0/0~09J}.
...
| shell/math.c | 3 ++-
...
Without hurry or pressure or any of such sort, but to be more
explicit than in the patch commit message of the thing i had sent,
it
Both ash and hush segfault when asked to evaluate ${0::0/0~09J}.
The stack for integer values in the arithmetic code was too small:
'09J' results in three integers. The leading zero starts an octal
number but '9' isn't an octal digit so '0', '9' and the variable
'Z' are placed on the stack.