Continue loop if space for hostname not large enough

When attempting to build a search domain from the local hostname
(used as a fallback when no other methods have given a search
domain), the code doubles the buffer size on each loop iteration.

However, the loop previously had a WHILE_FALSE terminator so the continue
statement exited the loop rather than going round again.
pull/25/head
David Drysdale 10 years ago committed by Jakub Hrozek
parent 3d3ab03c6d
commit a0b24beb95
  1. 2
      ares_init.c

@ -1409,7 +1409,7 @@ static int init_by_defaults(ares_channel channel)
goto error;
}
} WHILE_FALSE;
} while (res != 0);
dot = strchr(hostname, '.');
if (dot) {

Loading…
Cancel
Save