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

RE: Invalid assigment to cast in back-bdb (ITS#2541)



> -----Original Message-----
> From: owner-openldap-bugs@OpenLDAP.org
> [mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of
h.b.furuseth@usit.uio.no

> Full_Name: Hallvard B Furuseth
> Version: HEAD
> OS:
> URL:
> Submission from: (NULL) (129.240.186.42)
> Submitted by: hallvard
>
>
> ISO C forbids use of cast expressions as lvalues: that's a
> gcc extension.
> However, back-bdb/delete.c does `BEI(e) = <value>;' at lines
> 491 and 495,
> with '#define BEI(e) ((EntryInfo *) ((e)->e_private))' from
> back-bdb.h.
> I suggest to use `#define SET_BEI(e, val) ((e)->e_private = (val))'.

There's a different problem here; the EntryInfo corresponding to this entry
has already been deleted, and the entry is now being used in a search
operation, with its parent's EntryInfo. This usage is bogus.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support