Re: tcsh in current-8.0 coredump

From: Anton Yuzhaninov <citrin_at_citrin.ru>
Date: Wed, 20 Feb 2008 16:27:07 +0300
On 20.02.2008 4:56, Rui Paulo wrote:
> 
> On Feb 19, 2008, at 9:47 PM, Anton Yuzhaninov wrote:
> 
>> Problem was described here:
>> http://docs.freebsd.org/cgi/mid.cgi?131632274.20070319100945
>> http://mx.gw.com/pipermail/tcsh-bugs/2007-March/000481.html
>>
>> This was fixed for RELENG_7:
>>
>> http://www.freebsd.org/cgi/cvsweb.cgi/src/contrib/tcsh/sh.lex.c
>> Revision 1.1.1.8 (vendor branch): download - view: text, markup, 
>> annotated - select for diffs
>> Tue Apr 3 15:51:53 2007 UTC (10 months, 2 weeks ago) by mp
>> Branches: ZOULAS, MAIN
>> CVS tags: tcsh_6_15p1, RELENG_7_BP, RELENG_7_0_BP, RELENG_7_0, RELENG_7
>> Diff to: previous 1.1.1.7: preferred, colored
>> Changes since revision 1.1.1.7: +2 -1 lines
>>
>> Import vendor patch to fix postcmd regression in tcsh-6.15.00.
>> -------
>>
>> But this bug was not fixed in HEAD.
>>
> 
> Are you sure? I seem to recall this was fixed even before RELENG_7 was 
> tagged.
> 

$ cvs up
$ cvs diff -r HEAD -r RELENG_7 contrib/tcsh/sh.lex.c
Index: contrib/tcsh/sh.lex.c
===================================================================
RCS file: /home/ncvs/src/contrib/tcsh/sh.lex.c,v
retrieving revision 1.1.1.9
retrieving revision 1.1.1.8
diff -u -r1.1.1.9 -r1.1.1.8
--- contrib/tcsh/sh.lex.c       15 Oct 2007 16:54:07 -0000      1.1.1.9
+++ contrib/tcsh/sh.lex.c       3 Apr 2007 15:51:53 -0000       1.1.1.8
_at__at_ -851,7 +851,8 _at__at_
             return (en);
         }
         slhs.len = 0;
-       Strbuf_append(&slhs, lhsb.s);
+       if (lhsb.s != NULL && lhsb.len != 0)
+           Strbuf_append(&slhs, lhsb.s);
         Strbuf_terminate(&slhs);
         if (exclc)
             en = dosub(sc, en, global);

As you can see from cvs diff, null pointer check present in RELENG_7. but absent in HEAD

-- 
WBR,
  Anton Yuzhaninov
Received on Wed Feb 20 2008 - 12:27:43 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:27 UTC