diff --git a/lib/dns/rdataslab.c b/lib/dns/rdataslab.c index f7b51df147..941e60a318 100644 --- a/lib/dns/rdataslab.c +++ b/lib/dns/rdataslab.c @@ -361,7 +361,9 @@ dns_rdataslab_fromrdataset(dns_rdataset_t *rdataset, isc_mem_t *mctx, ? DNS_RDATASLAB_OFFLINE : 0; } - memmove(rawbuf, x[i].rdata.data, x[i].rdata.length); + if (x[i].rdata.length != 0) { + memmove(rawbuf, x[i].rdata.data, x[i].rdata.length); + } rawbuf += x[i].rdata.length; }