]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
upload: Avoid infinite loop when checking for auth bits
authorTor Arntsen <tor@spacetec.no>
Wed, 7 Jul 2010 09:55:31 +0000 (11:55 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 7 Jul 2010 17:35:03 +0000 (19:35 +0200)
The test would loop forever if authtype bit 0 wasn't set.

src/main.c

index 7aa698505b47aa659f42fb96d29f4645e948e882..60e7b596b1de737abdc13d9c7e21a532920f3b1a 100644 (file)
@@ -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! */