Since the users of the resolution expect the x and y values to be non-zero, enforce it in the parser and report an error if either is zero. Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx> --- src/conf/domain_conf.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a446ce4d62..38f8b37b69 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -15382,6 +15382,12 @@ virDomainVideoResolutionDefParseXML(xmlNodePtr node) return NULL; } + if (def->x == 0 || def->y == 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("resolution values must be greater than 0")); + return NULL; + } + return g_steal_pointer(&def); } -- 2.21.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list