From e7743aa7b4862df945a9586c181dfc1429c02d8c Mon Sep 17 00:00:00 2001 From: Tor Arntsen Date: Wed, 7 Jul 2010 11:55:31 +0200 Subject: upload: Avoid infinite loop when checking for auth bits The test would loop forever if authtype bit 0 wasn't set. --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index 7aa698505..60e7b596b 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! */ -- cgit v1.2.3