[erlang-bugs] Bug in ei_resolve.c/copy_hostent
Mon Oct 6 17:10:54 CEST 2008
There is a very bad bug in ei_resolve.c's copy_hostent. The function
modifies the source hostent structure provided by gethost* functions,
and in particular h_aliases and h_addr_list, while it shouldn't. On
MacOS X 10.4, this yields to a heap corruption. One can arguably
blame MacOS X for this bug (which might be fixed on 10.5), but yet I
believe the fields should be copied for safety. The attached patch
fixes the problem and declares the source hostent const to enforce
the check by the compiler.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1531 bytes
Desc: not available
More information about the erlang-bugs