Jelajahi Sumber

Fix infinite loop when unresolvable host is in allowed_hosts

Instead of adding an additional `dns_acl_curr = dns_acl_curr->next;`
as Nick did in pull request #120, I just moved it down to after the 'if'
John C. Frickson 8 tahun lalu
induk
melakukan
46f6d7ae3a
2 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 1 0
      Changelog
  2. 2 2
      src/acl.c

+ 1 - 0
Changelog

@@ -14,6 +14,7 @@ FIXES
 - Fix build failure with -Werror=format-security (Bas Couwenberg)
 - Fixed a typo in `nrpe.spec.in` (John Frickson)
 - More detailed error logging for SSL (John Frickson)
+- Fix infinite loop when unresolvable host is in allowed_hosts (Nick / John Frickson)
 
 
 3.1.0 - 2017-04-17

+ 2 - 2
src/acl.c

@@ -565,9 +565,9 @@ int is_an_allowed_host(int family, void *host)
 					break;
 				}
 			}
-
-			dns_acl_curr = dns_acl_curr->next;
 		}
+
+		dns_acl_curr = dns_acl_curr->next;
 	}
 	return 0;
 }