dovecot-2.2: lib-dns: Fixed handling failed DNS lookups.

dovecot at dovecot.org dovecot at dovecot.org
Wed Mar 19 07:45:45 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/b4ab1a27b66e
changeset: 17163:b4ab1a27b66e
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Mar 19 09:45:15 2014 +0200
description:
lib-dns: Fixed handling failed DNS lookups.

diffstat:

 src/lib-dns/dns-lookup.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (15 lines):

diff -r 30fb6e95b110 -r b4ab1a27b66e src/lib-dns/dns-lookup.c
--- a/src/lib-dns/dns-lookup.c	Tue Mar 18 16:49:10 2014 +0200
+++ b/src/lib-dns/dns-lookup.c	Wed Mar 19 09:45:15 2014 +0200
@@ -100,9 +100,9 @@
 			}
 			return 1;
 		}
-		/* first line: <ret> <ip count> */
+		/* first line: <ret> [<ip count>] */
 		if (sscanf(line, "%d %u", &result->ret,
-			   &result->ips_count) != 2)
+			   &result->ips_count) < 1)
 			return -1;
 		if (result->ret != 0) {
 			result->error = net_gethosterror(result->ret);


More information about the dovecot-cvs mailing list