From: Tor Arntsen Date: Wed, 7 Jul 2010 09:55:31 +0000 (+0200) Subject: upload: Avoid infinite loop when checking for auth bits X-Git-Tag: curl-7_21_1~98 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e7743aa7b4862df945a9586c181dfc1429c02d8c;p=thirdparty%2Fcurl.git upload: Avoid infinite loop when checking for auth bits The test would loop forever if authtype bit 0 wasn't set. --- diff --git a/src/main.c b/src/main.c index 7aa698505b..60e7b596b1 100644 --- a/src/main.c +++ b/src/main.c @@ -4925,7 +4925,7 @@ operate(struct Configurable *config, int argc, argv_item_t argv[]) int authbits = 0; int bitcheck = 0; while(bitcheck < 32) { - if(config->authtype & (1 << bitcheck)) { + if(config->authtype & (1 << bitcheck++)) { authbits++; if(authbits > 1) { /* more than one, we're done! */