urlapi: address (harmless) UndefinedBehavior sanitizer warning

`while(i--)` causes runtime error: unsigned integer overflow: 0 - 1
cannot be represented in type 'size_t' (aka 'unsigned long')

Closes #8797
This commit is contained in:
Sergey Markelov 2022-05-04 17:22:19 -07:00 committed by Daniel Stenberg
parent 6db4ef1242
commit b5b86856a9
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -228,7 +228,7 @@ static void strcpy_url(char *output, const char *url, bool relative)
*/
bool Curl_is_absolute_url(const char *url, char *buf, size_t buflen)
{
size_t i;
int i;
DEBUGASSERT(!buf || (buflen > MAX_SCHEME_LEN));
(void)buflen; /* only used in debug-builds */
if(buf)