]> git.ipfire.org Git - thirdparty/knot-resolver.git/commit
daemon/session2: try to avoid triggering Coverity
authorVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 12 Sep 2024 12:54:16 +0000 (14:54 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 12 Sep 2024 13:37:21 +0000 (15:37 +0200)
commit9f170a809a362093a9a010b0ac37d259534dc26f
tree219bf63f2d7661ad5c52bd46b12fc7b3a0796988
parente6681fdd4ab8b017a2827f7c690283aaa97d0928
daemon/session2: try to avoid triggering Coverity

Strictly speaking, the .ip member is on 16 bytes long,
so it doesn't suffice in case it's an IPv6.
Practically it doesn't matter, as there's the union containing all this.

Either way, I think it's cleaner to copy to the whole union.
Also we don't support it in this case,
but theoretically e.g. an AF_UNIX could happen,
so let's be defensive and guard by kr_require().
daemon/session2.c