sh_funscope(): Fix possible dereference of null pointer
Patch from OpenSUSE: https://build.opensuse.org/package/view_file/shells/ksh/ksh93-unset-f.dif
This commit is contained in:
parent
129614b99f
commit
c52cb93999
|
|
@ -3120,7 +3120,8 @@ int sh_funscope(int argn, char *argv[],int(*fun)(void*),void *arg,int execflg)
|
|||
shp->st.var_local = shp->var_tree;
|
||||
if(!fun)
|
||||
{
|
||||
shp->st.filename = fp->node->nvalue.rp->fname;
|
||||
if(fp->node->nvalue.rp)
|
||||
shp->st.filename = fp->node->nvalue.rp->fname;
|
||||
shp->st.funname = nv_name(fp->node);
|
||||
shp->last_root = nv_dict(DOTSHNOD);
|
||||
nv_putval(SH_PATHNAMENOD,shp->st.filename,NV_NOFREE);
|
||||
|
|
|
|||
Loading…
Reference in New Issue