1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 11:13:36 +02:00

Fix arg list segfault

This commit is contained in:
Rasmus Lerdorf
2003-03-24 19:28:58 +00:00
parent 1d71c7b86e
commit e120dab4f2
+5 -1
View File
@@ -1106,7 +1106,11 @@ PHP_FUNCTION(socket_iovec_alloc)
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++) {