From 375483f873c30756f7a37322237eb92a957e04e2 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Thu, 12 Mar 2020 12:33:26 +0200 Subject: Fix possible memory bounds violation * src/pinger.c (check_host): Fix switch condition. --- src/pinger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pinger.c b/src/pinger.c index 53fedfa..370d5d1 100644 --- a/src/pinger.c +++ b/src/pinger.c @@ -943,7 +943,7 @@ check_host(char const *name) } found = 0; for (uent = update_head; uent; uent = uent->next) { - switch (update_head->type) { + switch (uent->type) { case UPDATE_APPEND: case UPDATE_REPLACE: for (hp = uent->v.hlist->head; hp; hp = hp->next) { -- cgit v1.2.1