I fixed this in 4.3, but the basic problem is that the API is braindead for this socket_iovec_alloc() function. We shouldn't need to pass the number of vectors as the first argument, it should just take the vectors directly and the function can figure out how many were passed. So, I think I'd rather change the API for php5 than merge this fix in.
-Rasmus > rasmus Mon Mar 24 14:28:58 2003 EDT > > Modified files: (Branch: PHP_4_3) > /php4/ext/sockets sockets.c > Log: > Fix arg list segfault > > > Index: php4/ext/sockets/sockets.c > diff -u php4/ext/sockets/sockets.c:1.125.2.5 > php4/ext/sockets/sockets.c:1.125.2.6 > --- php4/ext/sockets/sockets.c:1.125.2.5 Mon Mar 10 10:57:07 2003 > +++ php4/ext/sockets/sockets.c Mon Mar 24 14:28:58 2003 > @@ -19,7 +19,7 @@ > > +----------------------------------------------------------------------+ > */ > > -/* $Id: sockets.c,v 1.125.2.5 2003/03/10 15:57:07 ddhill Exp $ */ > +/* $Id: sockets.c,v 1.125.2.6 2003/03/24 19:28:58 rasmus Exp $ */ > > #ifdef HAVE_CONFIG_H > #include "config.h" > @@ -1106,7 +1106,11 @@ > > convert_to_long_ex(args[0]); > num_vectors = Z_LVAL_PP(args[0]); > - > + > + if((argc-1) < num_vectors) { > + efree(args); > + WRONG_PARAM_COUNT; > + } > vector_array = emalloc(sizeof(struct iovec)*(num_vectors+1)); > > for (i = 0, j = 1; i < num_vectors; i++, j++) { > > > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php