From: Antony Dovgal Date: Thu, 28 Dec 2006 14:17:09 +0000 (+0000) Subject: minor improvements X-Git-Tag: RELEASE_1_0_0RC1~471 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d312d33f4635fa8277661591293344cb346d3368;p=php minor improvements --- diff --git a/ext/ereg/ereg.c b/ext/ereg/ereg.c index a9ebaaee88..952a9cee35 100644 --- a/ext/ereg/ereg.c +++ b/ext/ereg/ereg.c @@ -425,7 +425,7 @@ PHPAPI char *php_reg_replace(const char *pattern, const char *replace, const cha buf = nbuf; } /* stick that last bit of string on our output */ - strcat(buf, &string[pos]); + strlcat(buf, &string[pos], buf_len); } } diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 60d7623894..417f841727 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -1627,11 +1627,12 @@ PHP_FUNCTION(socket_set_option) { zval *arg1, **arg4; struct linger lv; - struct timeval tv; php_socket *php_sock; int ov, optlen, retval; #ifdef PHP_WIN32 int timeout; +#else + struct timeval tv; #endif long level, optname; void *opt_ptr; diff --git a/ext/standard/reg.c b/ext/standard/reg.c index a9ebaaee88..952a9cee35 100644 --- a/ext/standard/reg.c +++ b/ext/standard/reg.c @@ -425,7 +425,7 @@ PHPAPI char *php_reg_replace(const char *pattern, const char *replace, const cha buf = nbuf; } /* stick that last bit of string on our output */ - strcat(buf, &string[pos]); + strlcat(buf, &string[pos], buf_len); } }