]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: allow calling virSocketAddrGetIPPrefix with NULL netmask or address
authorLaine Stump <laine@laine.org>
Tue, 26 Apr 2016 18:55:12 +0000 (14:55 -0400)
committerLaine Stump <laine@laine.org>
Sun, 26 Jun 2016 23:33:08 +0000 (19:33 -0400)
commit9359167ec0caf27c44c26e14ba27be20342ecddc
tree9b9141830753e71b5ba007072d8299b7614de199
parente1219b6f3c23a785b2a3fc2ce2f61d0e33aebe12
util: allow calling virSocketAddrGetIPPrefix with NULL netmask or address

There are times when we don't have a netmask pointer to give to
virSocketAddrGetIPPrefix() (e.g. the IP addresses in domain interfaces
only have a prefix, no netmask), but it would have caused a segv if we
called it with NULL instead of a pointer to a netmask. This patch
qualifies the code that would use the netmask or address pointers to
check for NULL first.
src/util/virsocketaddr.c