phi
2013-10-08 13:33:33 UTC
Hi All,
Well I said in my last post I submitted a bug fix, but this bounced, I
guess I goofed with my 'From:' addr. Here it is again.
===========================================
I submitted a bug fix to debian, but pardon my ignorance I didn't knew
that I got to send bug fix upstream first before this could reach
distros and os's.
So I suscribed to this list with my professional addr phi at hp.com and
propose the fix here to be discussed and may be implemented.
I dunno if I got to provide a .patch (or some sort of diff) here, if so,
gently let me know how.
Problem description
===================
Using an interactive ksh93, typing ## at the prompt (and more generally
#<many other chars>) result in either core dump or memory coruption.
I reproduced this with a fresh install of debian i386, build and run.
The bug is located in src/cmd/ksh93/edit/edit.c function ed_histgen()
...
char *cp, **argv, **av, **ar;
argv=0; // <<==== Added this line
if(!(hp=ep->sh->gd->hist_ptr))
...
the exit sequence in latest source look like this
ep->hlist = (Histmatch_t**)argv;
ep->hfirst = ep->hlist?ep->hlist[0]:0;
return(ep->hmax=ac);
When typing ## at prompt, we can reach the exit sequence with argv
unitialised.
Cheers,
Phi
Well I said in my last post I submitted a bug fix, but this bounced, I
guess I goofed with my 'From:' addr. Here it is again.
===========================================
I submitted a bug fix to debian, but pardon my ignorance I didn't knew
that I got to send bug fix upstream first before this could reach
distros and os's.
So I suscribed to this list with my professional addr phi at hp.com and
propose the fix here to be discussed and may be implemented.
I dunno if I got to provide a .patch (or some sort of diff) here, if so,
gently let me know how.
Problem description
===================
Using an interactive ksh93, typing ## at the prompt (and more generally
#<many other chars>) result in either core dump or memory coruption.
I reproduced this with a fresh install of debian i386, build and run.
The bug is located in src/cmd/ksh93/edit/edit.c function ed_histgen()
...
char *cp, **argv, **av, **ar;
argv=0; // <<==== Added this line
if(!(hp=ep->sh->gd->hist_ptr))
...
the exit sequence in latest source look like this
ep->hlist = (Histmatch_t**)argv;
ep->hfirst = ep->hlist?ep->hlist[0]:0;
return(ep->hmax=ac);
When typing ## at prompt, we can reach the exit sequence with argv
unitialised.
Cheers,
Phi