40 lines
1.0 KiB
Plaintext
40 lines
1.0 KiB
Plaintext
--- src/cmd/ksh93/edit/edit.c
|
|
+++ src/cmd/ksh93/edit/edit.c 2011-08-30 16:07:02.059926160 +0000
|
|
@@ -1668,7 +1668,7 @@ int ed_histgen(Edit_t *ep,const char *pa
|
|
History_t *hp;
|
|
off_t offset;
|
|
int ac=0,l,m,n,index1,index2;
|
|
- char *cp, **argv, **av, **ar;
|
|
+ char *cp, **argv=0, **av, **ar;
|
|
if(!(hp=ep->sh->gd->hist_ptr))
|
|
return(0);
|
|
if(*pattern=='#')
|
|
@@ -1746,8 +1746,13 @@ int ed_histgen(Edit_t *ep,const char *pa
|
|
mplast->next = mp;
|
|
mplast->next = 0;
|
|
}
|
|
- ep->hlist = (Histmatch_t**)argv;
|
|
- ep->hfirst = ep->hlist[0];
|
|
+ if (argv)
|
|
+ {
|
|
+ ep->hlist = (Histmatch_t**)argv;
|
|
+ ep->hfirst = ep->hlist[0];
|
|
+ }
|
|
+ else
|
|
+ ep->hfirst = 0;
|
|
return(ep->hmax=ac);
|
|
}
|
|
|
|
--- src/cmd/ksh93/sh/name.c
|
|
+++ src/cmd/ksh93/sh/name.c 2011-08-30 15:55:30.900426385 +0000
|
|
@@ -967,7 +967,8 @@ Namval_t *nv_create(const char *name, D
|
|
if(c=='.' && (cp[1]==0 || cp[1]=='=' || cp[1]=='+'))
|
|
{
|
|
nv_local = 1;
|
|
- nv_onattr(np,nofree);
|
|
+ if (np)
|
|
+ nv_onattr(np,nofree);
|
|
return(np);
|
|
}
|
|
if(cp[-1]=='.')
|