Hello community, here is the log from the commit of package ksh checked in at Wed May 31 18:22:05 CEST 2006. -------- --- ksh/ksh.changes 2006-05-29 15:17:06.000000000 +0200 +++ ksh/ksh.changes 2006-05-31 17:19:22.000000000 +0200 @@ -1,0 +2,5 @@ +Wed May 31 17:18:43 CEST 2006 - werner@suse.de + +- Fix segmentation fault in vi command line mode (bug #179917) + +------------------------------------------------------------------- New: ---- ksh93-vi.dif ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ksh.spec ++++++ --- /var/tmp/diff_new_pack.AxaBy4/_old 2006-05-31 18:21:50.000000000 +0200 +++ /var/tmp/diff_new_pack.AxaBy4/_new 2006-05-31 18:21:50.000000000 +0200 @@ -17,7 +17,7 @@ PreReq: /bin/ln /etc/bash.bashrc Autoreqprov: on Version: 93r -Release: 12 +Release: 13 Summary: Korn Shell BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: INIT.2006-02-14.tar.bz2 @@ -30,6 +30,7 @@ Patch3: ksh93-shift_ijs.dif Patch4: ksh93-gmt2utc.dif Patch5: ksh93-uname.dif +Patch6: ksh93-vi.dif %description The original Korn Shell. The ksh is an sh-compatible command @@ -73,6 +74,7 @@ %patch3 %patch4 %patch5 +%patch6 %build # @@ -213,6 +215,8 @@ /usr/include/ast/ %changelog -n ksh +* Wed May 31 2006 - werner@suse.de +- Fix segmentation fault in vi command line mode (bug #179917) * Mon May 29 2006 - werner@suse.de - Make -i and -p option of uname builtin work (bug #178962) * Tue May 09 2006 - werner@suse.de ++++++ ksh93-shift_ijs.dif ++++++ --- /var/tmp/diff_new_pack.AxaBy4/_old 2006-05-31 18:21:51.000000000 +0200 +++ /var/tmp/diff_new_pack.AxaBy4/_new 2006-05-31 18:21:51.000000000 +0200 @@ -75,16 +75,6 @@ # endif static int _isalph(int); static int _ismetach(int); -@@ -2027,6 +2035,9 @@ - { - register int i; - -+ if (vp->lastline == NULL) -+ return; -+ - if( (i = cur_virt - first_virt + 1) > 0 ) - { - /*** save last thing user typed ***/ --- src/cmd/ksh93/include/national.h +++ src/cmd/ksh93/include/national.h 2006-04-19 12:17:59.000000000 +0200 @@ -29,7 +29,7 @@ ++++++ ksh93-vi.dif ++++++ --- src/cmd/ksh93/edit/vi.c +++ src/cmd/ksh93/edit/vi.c 2006-05-31 15:09:12.000000000 +0000 @@ -389,6 +397,9 @@ if(!yankbuf) { yankbuf = (genchar*)malloc(MAXLINE*CHARSIZE); + } + if (!vp->lastline) + { vp->lastline = (genchar*)malloc(MAXLINE*CHARSIZE); } if( vp->last_cmd == '\0' ) @@ -400,6 +411,8 @@ vp->lastmotion = '\0'; vp->lastrepeat = 1; vp->repeat = 1; + if (!yankbuf) + return(-1); *yankbuf = 0; } @@ -1065,7 +1078,7 @@ /*** save characters to be deleted ***/ - if( mode != 'c' ) + if( mode != 'c' && yankbuf ) { i = cp[nchars]; cp[nchars] = 0; @@ -2027,6 +2040,9 @@ { register int i; + if (vp->lastline == NULL) + return; + if( (i = cur_virt - first_virt + 1) > 0 ) { /*** save last thing user typed ***/ @@ -2272,6 +2288,11 @@ p = yankbuf; } + if (!p) + { + return(BAD); + } + addin: switch( c ) { @@ -2530,6 +2551,8 @@ vp->lastmotion = c; if( c == 'y' ) { + if (!yankbuf) + return(BAD); gencpy(yankbuf, virtual); } else if(!delmotion(vp, c, 'y')) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...
participants (1)
-
root@suse.de