mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-10-25 12:14:38 +00:00
cache: Fix potential NULL deref in arcane situations.
This commit is contained in:
1 parent
0003db15cb
commit
f162d344c0
1 file changed
+1
-1
+1
-1
@@ -479,7 +479,7 @@ static struct crec *cache_scan_free(char *name, union all_addr *addr, unsigned s
|
||||
if ((crecp->flags & F_FORWARD) && hostname_isequal(cache_get_name(crecp), name))
|
||||
{
|
||||
int rrmatch = 0;
|
||||
if (crecp->flags & flags & F_RR)
|
||||
if (addr && (crecp->flags & flags & F_RR))
|
||||
{
|
||||
unsigned short rrc = (crecp->flags & F_KEYTAG) ? crecp->addr.rrblock.rrtype : crecp->addr.rrdata.rrtype;
|
||||
unsigned short rra = (flags & F_KEYTAG) ? addr->rrblock.rrtype : addr->rrdata.rrtype;
|
||||
|
||||
Reference in new issue
Block a user