X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_url_api.c;h=30db604274ca4b3a7b8d9ef62998c6e6a4d17e20;hp=37c23cd6910f6b0e2dce4b64095fcc7d28e12f1f;hb=544386310b6f741953dac92f8735ae7339486510;hpb=b3afcfc70bf06c062115f4994cc04fc8c6e4aa67 diff --git a/http_url_api.c b/http_url_api.c index 37c23cd..30db604 100644 --- a/http_url_api.c +++ b/http_url_api.c @@ -6,7 +6,7 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2006, Michael Wallner | + | Copyright (c) 2004-2007, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -306,9 +306,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[8] = {0}; + char port_str[8]; - snprintf(port_str, lenof(port_str), "%d", (int) url->port); + snprintf(port_str, sizeof(port_str), "%d", (int) url->port); strlcat(*url_str, ":", HTTP_URL_MAXLEN); strlcat(*url_str, port_str, HTTP_URL_MAXLEN); }