Sara Golemon wrote:pollita Fri Feb 20 16:05:37 2004 EDT Modified files: /php-src/ext/ftp ftp.c Log: s_addr is always unsigned 32bit, long is not.
+ /* Deal with differing integer sizes */ + memcpy(&(sin->sin_addr.s_addr), &(ipbox.c[0]), 4);
Hi Sara,
What's wrong with (int)ipbox.l[0] ? (as sizeof(int) == 4, even if sizeof(long) is not)
Yep. This memcpy() doesn't look very good. It seems to me that it could screw up depending on the endian-ness of the machine. I'd also go for the cast.
Andi
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php