]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
httpAddrConnect2 could get into an infinite loop for socket errors.
authorMichael Sweet <michael.r.sweet@gmail.com>
Tue, 24 May 2016 02:13:54 +0000 (22:13 -0400)
committerMichael Sweet <michael.r.sweet@gmail.com>
Tue, 24 May 2016 02:13:54 +0000 (22:13 -0400)
cups/http-addrlist.c

index 90965457e405b4be53cfef4224efa54176911019..f74d9ed7a659d2998a3b03f2acb65ed763ea72c5 100644 (file)
@@ -132,9 +132,12 @@ httpAddrConnect2(
       {
        /*
        * Don't abort yet, as this could just be an issue with the local
-       * system not being configured with IPv4/IPv6/domain socket enabled...
+       * system not being configured with IPv4/IPv6/domain socket enabled.
+       *
+       * Just skip this address...
        */
 
+        addrlist = addrlist->next;
        continue;
       }
 
@@ -213,6 +216,7 @@ httpAddrConnect2(
       {
        DEBUG_printf(("1httpAddrConnect2: Unable to connect to %s:%d: %s", httpAddrString(&(addrlist->addr), temp, sizeof(temp)), httpAddrPort(&(addrlist->addr)), strerror(errno)));
        httpAddrClose(NULL, fds[nfds]);
+       addrlist = addrlist->next;
        continue;
       }