]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: Avoid NULL-dereference in virDomainObjGetMessages
authorJiri Denemark <jdenemar@redhat.com>
Fri, 11 Feb 2022 12:56:29 +0000 (13:56 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 11 Feb 2022 14:06:49 +0000 (15:06 +0100)
commita7d77e2587bd8495b4216d04fd981e529dfeb136
tree61ad71f4cd7a1dd5e6b0e49b51ca28215fa898b3
parent3a311593e5eb8d464a6033ccfab62932c701071d
conf: Avoid NULL-dereference in virDomainObjGetMessages

All callers currently guarantee flags passed to virDomainObjGetMessages
are either zero or contain at least one of the supported flags. But it
doesn't mean we should not check for the possibility an unknown flag was
the only one passed to virDomainObjGetMessages.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/domain_conf.c