From: Tobias Brunner Date: Wed, 2 Jul 2014 10:08:16 +0000 (+0200) Subject: winhttp: Do not use countof() on pointer argument X-Git-Tag: 5.2.0~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=118b2879aa0c1b3750576d581dd0f79a3fe8cb41;p=thirdparty%2Fstrongswan.git winhttp: Do not use countof() on pointer argument --- diff --git a/src/libstrongswan/plugins/winhttp/winhttp_fetcher.c b/src/libstrongswan/plugins/winhttp/winhttp_fetcher.c index 6ab8662340..5f0b584799 100644 --- a/src/libstrongswan/plugins/winhttp/winhttp_fetcher.c +++ b/src/libstrongswan/plugins/winhttp/winhttp_fetcher.c @@ -211,7 +211,7 @@ static bool parse_uri(private_winhttp_fetcher_t *this, char *uri, } if (comps.dwExtraInfoLength) { - wcsncat(path, extra, countof(path) - comps.dwUrlPathLength - 1); + wcsncat(path, extra, pathlen - comps.dwUrlPathLength - 1); } if (comps.nPort) {