resolved: do not try to copy empty NSEC types bitmaps
authorAlexander Tsoy <alexander@tsoy.me>
Mon, 28 Jun 2021 20:00:11 +0000 (23:00 +0300)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 29 Jun 2021 08:47:18 +0000 (10:47 +0200)
commit1f00a50c695fe3b55dee38fbd02a902a6c703c87
tree9f8771d401b5b9af9ee8fe3f44979da2b8796903
parent9952f11a84b333a36e9f1f4a62b951ab84c897f5
resolved: do not try to copy empty NSEC types bitmaps

dns_resource_record_copy() assumes that NSEC types bitmap is non-empty
which results in a null pointer dereference inside bitmap_copy() in some
cases. Fix this by calling bitmap_copy() conditionally.
src/resolve/resolved-dns-rr.c