diff --git a/src/ChangeLog b/src/ChangeLog index 1b42b020..d7934d72 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-08-06 Jochen Roderburg + + * host.c (lookup_host): Ensure it doesn't print more IPs than available + ones. + 2011-08-06 Giuseppe Scrivano * init.c (defaults): Set default value for show_all_dns_entries. diff --git a/src/host.c b/src/host.c index 505f706c..86f107a3 100644 --- a/src/host.c +++ b/src/host.c @@ -828,8 +828,8 @@ lookup_host (const char *host, int flags) int i; int printmax = al->count; - if (! opt.show_all_dns_entries) - printmax = 3; + if (!opt.show_all_dns_entries && printmax > 3) + printmax = 3; for (i = 0; i < printmax; i++) {