From ab9dc6ebcadd2a99ca88752e1bac8c996cb15442 Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Fri, 21 Dec 2018 15:22:16 -0500 Subject: [PATCH] Fix segfault in FTL_reply corresponding to name being null Signed-off-by: Mcat12 --- dnsmasq_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dnsmasq_interface.c b/dnsmasq_interface.c index b2b793cc4..03dfd402e 100644 --- a/dnsmasq_interface.c +++ b/dnsmasq_interface.c @@ -425,7 +425,7 @@ void FTL_reply(unsigned short flags, char *name, struct all_addr *addr, int id) // Determine if this reply is an exact match for the queried domain int domainID = queries[i].domainID; validate_access("domains", domainID, true, __LINE__, __FUNCTION__, __FILE__); - bool isExactMatch = (strcmp(domains[domainID].domain, name) == 0); + bool isExactMatch = (name != NULL && strcmp(domains[domainID].domain, name) == 0); if((flags & F_CONFIG) && isExactMatch && !queries[i].complete) {