summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Toorop <willem@nlnetlabs.nl>2017-10-16 10:41:51 +0200
committerWillem Toorop <willem@nlnetlabs.nl>2017-10-16 10:41:51 +0200
commit792c5c1d57eb5bdae777f7b41f82b0b237c5fe1e (patch)
tree3753bc5ef75969f3d8d945d567dae0b74ab9f094
parent17c28fffeff8501fb3fe21662593c82dbd488f68 (diff)
downloadldns-792c5c1d57eb5bdae777f7b41f82b0b237c5fe1e.tar.gz
bugfix #1569: Possible NULL pointer dereference
Thanks Bill Parker
-rw-r--r--Changelog2
-rw-r--r--resolver.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/Changelog b/Changelog
index a86c7673..45f03691 100644
--- a/Changelog
+++ b/Changelog
@@ -1,5 +1,5 @@
1.7.1 ????-??-??
- * bugfix #1566, #1568: Possible NULL Pointer Dereference
+ * bugfix #1566, #1568, #1569: Possible NULL Pointer Dereferences
Thanks Bill Parker
* bugfix #1260: Anticipate strchr returning NULL on unfound char
Thanks Stephan Zeisberg
diff --git a/resolver.c b/resolver.c
index a082379d..2be9e395 100644
--- a/resolver.c
+++ b/resolver.c
@@ -1180,6 +1180,7 @@ ldns_resolver_backup_rtt(ldns_resolver *r)
if (old_rtt && ldns_resolver_nameserver_count(r)) {
new_rtt = LDNS_XMALLOC(size_t
, ldns_resolver_nameserver_count(r));
+ if (!new_rtt) return NULL;
memcpy(new_rtt, old_rtt, sizeof(size_t)
* ldns_resolver_nameserver_count(r));
ldns_resolver_set_rtt(r, new_rtt);