[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: shell-backend/result.c bug



Please file an ITS with a unified diff (-u), thanks.

At 02:35 PM 4/14/00 -0700, Mei-Hui Su wrote:
>
>Hi,
>
>  We found a bug in servers/slapd/back-shell/result.c in 1.2.9 and
>also in 1.2.7 and the development tree. What happens is that when
>buf got 'reallocated', the bp (the buf place pointer) did not get
>moved. This will lead to memory corruption and seg faults. This is 
>the patch for it,
>
>hammie 58% diff new_result.c result.c
>24c24
><       int     bsize, len, offset;
>---
>>       int     bsize, len;
>46d45
><                       offset = (int) (bp - buf);
>48d46
><                       bp = buf + offset;
>
>  We have already double checke the other back-X directory in 
>1.2.7 and 1.2.9 and developement tree. back-ldbm's search.c got
>it correctly. But in the development tree's servers/slapd/back-tcl's
>tcl_modify.c(1) and tcl_util.c(2), there are similar problems.  
>
>mei
>
>