This commit is contained in:
Antony Dovgal 2006-12-28 14:17:38 +00:00
parent 46a6bd7f9d
commit fdfa403388
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

@ -1600,11 +1600,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);
}
}