Commit: b06f00477ce4f20516c6f727797f208ffaefcae9 Author: Gustavo Lopes <glo...@nebm.ist.utl.pt> Fri, 2 Nov 2012 17:52:13 +0100 Parents: 806a6e6399568d3bfbef355992fb3d09e29a607c Branches: PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b06f00477ce4f20516c6f727797f208ffaefcae9 Log: Fix bug converting zval sockaddr The bug ocurred when the family was not specified but was instead guessed. Changed paths: M ext/sockets/sendrecvmsg.c Diff: diff --git a/ext/sockets/sendrecvmsg.c b/ext/sockets/sendrecvmsg.c index 379af12..837ae23 100644 --- a/ext/sockets/sendrecvmsg.c +++ b/ext/sockets/sendrecvmsg.c @@ -627,6 +627,7 @@ static void from_zval_write_sockaddr_aux(const zval *container, *sockaddr_len = sizeof(struct sockaddr_in); if (fill_sockaddr) { from_zval_write_sockaddr_in(container, (char*)*sockaddr_ptr, ctx); + (*sockaddr_ptr)->sa_family = AF_INET; } break; case AF_INET6: @@ -639,6 +640,7 @@ static void from_zval_write_sockaddr_aux(const zval *container, *sockaddr_len = sizeof(struct sockaddr_in6); if (fill_sockaddr) { from_zval_write_sockaddr_in6(container, (char*)*sockaddr_ptr, ctx); + (*sockaddr_ptr)->sa_family = AF_INET6; } break; default: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php