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

Re: s_addr may be a bit field (ITS#340)



Keith Thompson wrote:
> > >The provided patch changes references to the address of an s_addr member to
> > >the address of the enclosing structure, which gives the same result on all
> > >systems I've been able to check.
> >
> > Can we not also use the sizeof the enclosing structure?
> 
> Not necessarily; the enclosing structure will likely be bigger than
> the bit field.

> I think there are some usages in OpenLDAP where this could be a
> problem.  I recall seeing places where it does a memcpy to a target
> object (a char array?) that might be only 4 bytes.

Then these should be fixed.

-- 
Kurt D. Zeilenga <kurt@boolean.net>
Net Boolean Incorporated <http://www.boolean.net/>