Skip to content

Commit

Permalink
resolved: bugfix of null pointer p->question dereferencing (#6020)
Browse files Browse the repository at this point in the history
  • Loading branch information
evverx committed May 24, 2017
1 parent d82c4b9 commit a924f43
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/resolve/resolved-dns-packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -2269,6 +2269,9 @@ int dns_packet_is_reply_for(DnsPacket *p, const DnsResourceKey *key) {
if (r < 0)
return r;

if (!p->question)
return 0;

if (p->question->n_keys != 1)
return 0;

Expand Down

0 comments on commit a924f43

Please sign in to comment.