Re: [PATCH] null pointer deref in bindpwd

2023-06-22 Thread Chet Ramey
On 6/17/23 2:57 AM, Grisha Levit wrote: Only triggered by doing something stupid: bash -c 'declare -n OLDPWD=X[SHLVL=-1]; /; cd /' bash: line 1: X[SHLVL=-1]: bad array subscript Segmentation fault: 11 Thanks for the report. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer

[PATCH] null pointer deref in bindpwd

2023-06-16 Thread Grisha Levit
Only triggered by doing something stupid: bash -c 'declare -n OLDPWD=X[SHLVL=-1]; /; cd /' bash: line 1: X[SHLVL=-1]: bad array subscript Segmentation fault: 11 --- diff --git a/builtins/cd.def b/builtins/cd.def index de123f8b..e3156463 100644 --- a/builtins/cd.def +++ b/builtins/cd.def @@ -158,1