From 33b5229c5eb616bb73fbd60a94d874eaf9ef6ce2 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 7 Sep 2017 19:27:50 +0200 Subject: [PATCH] Add memory validation before trying to access client data Signed-off-by: DL6ER --- parser.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/parser.c b/parser.c index 9e065870..6900d319 100644 --- a/parser.c +++ b/parser.c @@ -1019,8 +1019,11 @@ void validate_access_oTfd(int timeidx, int pos, int line, const char * function, void reresolveHostnames(void) { int clientID; - for(clientID = 0; clientID < counters.clients_MAX; clientID++) + for(clientID = 0; clientID < counters.clients; clientID++) { + // Memory validation + validate_access("clients", clientID, true, __LINE__, __FUNCTION__, __FILE__); + // Process this client only if it has at least one active query in the log if(clients[clientID].count < 1) continue;