[krbdev.mit.edu #6308] Alignment problem in resolver test

Ken Raeburn via RT rt-comment at krbdev.mit.edu
Tue Dec 30 14:47:30 EST 2008


On Dec 30, 2008, at 14:32, Ezra Peisach via RT wrote:
> With regards to alignment - I believe that is why the "fix" to use a
> union would force an alignment.  I will use an in_addr to ensure  
> alignment.
> As I indicated in my initial analysis - there is one other place
> gethostbyaddr is used w/o a struct in_addr - but the memory is
> malloced.   I am correct that malloc will return an alignment that is
> compatible w/ any structure - right?

To the best of my knowledge, yes, it'll have to be aligned well enough.

Ken




More information about the krb5-bugs mailing list