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

shell-backend/result.c bug



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