Skip to content

Commit

Permalink
Fix segfault in FTL_reply corresponding to name being null
Browse files Browse the repository at this point in the history
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
  • Loading branch information
AzureMarker committed Dec 21, 2018
1 parent f5f331b commit ab9dc6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dnsmasq_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit ab9dc6e

Please sign in to comment.