From 5b969e9665308562361cb01c0f63a2793f81f0ef Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 21 Feb 2006 22:43:17 +0000 Subject: [PATCH] - fix bug #6861: 5 digit ports get truncated --- http_url_api.c | 4 ++-- package2.xml | 11 ++--------- php_http.h | 2 +- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/http_url_api.c b/http_url_api.c index 5b618a3..cac64ec 100644 --- a/http_url_api.c +++ b/http_url_api.c @@ -276,9 +276,9 @@ PHP_HTTP_API void _http_build_url(int flags, const php_url *old_url, const php_u strlcat(*url_str, url->host, HTTP_URL_MAXLEN); if (url->port) { - char port_str[6] = {0}; + char port_str[8] = {0}; - snprintf(port_str, 5, "%d", (int) url->port); + snprintf(port_str, lenof(port_str), "%d", (int) url->port); strlcat(*url_str, ":", HTTP_URL_MAXLEN); strlcat(*url_str, port_str, HTTP_URL_MAXLEN); } diff --git a/package2.xml b/package2.xml index 4e338cf..84e31fa 100644 --- a/package2.xml +++ b/package2.xml @@ -37,7 +37,7 @@ HttpResponse 2006-00-00 - 0.24.0 + 0.24.1 0.24.0 @@ -46,14 +46,7 @@ HttpResponse BSD, revised diff --git a/php_http.h b/php_http.h index 9e67cfa..beddf2a 100644 --- a/php_http.h +++ b/php_http.h @@ -15,7 +15,7 @@ #ifndef PHP_EXT_HTTP_H #define PHP_EXT_HTTP_H -#define PHP_EXT_HTTP_VERSION "0.24.0" +#define PHP_EXT_HTTP_VERSION "0.24.1" #ifdef HAVE_CONFIG_H # include "config.h" -- 2.30.2