treewide: fix instances of memcpy(*, NULL, 0)

I don't think they could cause any practical issues, but they popped out when using sanitizing Knot with Resolver.

Merge request reports

Loading