1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 17:52:16 +01:00

minor improvements

This commit is contained in:
Antony Dovgal
2006-12-28 14:17:09 +00:00
parent 5a14146e28
commit d312d33f46
3 changed files with 4 additions and 3 deletions

View File

@@ -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);
}
}

View File

@@ -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;

View File

@@ -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);
}
}