diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2007-01-24 00:45:54 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2007-01-24 00:45:54 +0000 |
| commit | eb6b99d7df5d82396b5d7e750f312b211752f7c8 (patch) | |
| tree | 3fa1bd0280c71b7e9a9b86423b74020e56407899 | |
| parent | d32dc5bda0c7e27c570f52903efa9a04f4090ae2 (diff) | |
| download | php-git-eb6b99d7df5d82396b5d7e750f312b211752f7c8.tar.gz | |
strcat() -> strlcat()
| -rw-r--r-- | ext/standard/head.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/standard/head.c b/ext/standard/head.c index dc98c83121..370558f629 100644 --- a/ext/standard/head.c +++ b/ext/standard/head.c @@ -111,7 +111,7 @@ PHPAPI int php_setcookie(char *name, int name_len, char *value, int value_len, t if (expires > 0) { strcat(cookie, "; expires="); dt = php_format_date("D, d-M-Y H:i:s T", sizeof("D, d-M-Y H:i:s T")-1, expires, 0 TSRMLS_CC); - strcat(cookie, dt); + strlcat(cookie, dt, len + 100); efree(dt); } } @@ -121,18 +121,18 @@ PHPAPI int php_setcookie(char *name, int name_len, char *value, int value_len, t } if (path && path_len > 0) { - strcat(cookie, "; path="); - strcat(cookie, path); + strlcat(cookie, "; path=", len + 100); + strlcat(cookie, path, len + 100); } if (domain && domain_len > 0) { - strcat(cookie, "; domain="); - strcat(cookie, domain); + strlcat(cookie, "; domain=", len + 100); + strlcat(cookie, domain, len + 100); } if (secure) { - strcat(cookie, "; secure"); + strlcat(cookie, "; secure", len + 100); } if (httponly) { - strcat(cookie, "; httponly"); + strlcat(cookie, "; httponly", len + 100); } ctr.line = cookie; |
