summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Toorop <willem@nlnetlabs.nl>2017-10-16 11:51:11 +0200
committerWillem Toorop <willem@nlnetlabs.nl>2017-10-16 11:51:11 +0200
commit5d190fe936b85e2c5b421dfbdf5b841af2a0794d (patch)
treefbdb8c1dc7991a83129611400daeef3b827802e6
parent792c5c1d57eb5bdae777f7b41f82b0b237c5fe1e (diff)
downloadldns-5d190fe936b85e2c5b421dfbdf5b841af2a0794d.tar.gz
bugfix #1570: Potential NULL dereferences
Thanks Bill Parker
-rw-r--r--Changelog2
-rw-r--r--rr.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Changelog b/Changelog
index 45f03691..3dc27e3f 100644
--- a/Changelog
+++ b/Changelog
@@ -1,5 +1,5 @@
1.7.1 ????-??-??
- * bugfix #1566, #1568, #1569: Possible NULL Pointer Dereferences
+ * bugfix #1566, #1568, #1569, #1570: Potential NULL Dereferences
Thanks Bill Parker
* bugfix #1260: Anticipate strchr returning NULL on unfound char
Thanks Stephan Zeisberg
diff --git a/rr.c b/rr.c
index a1efb249..7d74fea4 100644
--- a/rr.c
+++ b/rr.c
@@ -2545,10 +2545,10 @@ ldns_rdf_bitmap_known_rr_types_set(ldns_rdf** rdf, int value)
/* Format rdf data according RFC3845 Section 2.1.2 (see above)
*/
dptr = data = LDNS_XMALLOC(uint8_t, sz);
- memset(data, value, sz);
if (!data) {
return LDNS_STATUS_MEM_ERR;
}
+ memset(data, value, sz);
for (i = 0; i < 256; i++) {
if (windows[i]) {
*dptr++ = (uint8_t)i;