mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 10:35:20 +00:00
conf: validate video resolution
Ensure that both x and y are non-zero when resolution is specified for a video device. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
parent
026c2ffb50
commit
889cd827ae
@ -6319,6 +6319,12 @@ virDomainVideoDefValidate(const virDomainVideoDef *video,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (video->res && (video->res->x == 0 || video->res->y == 0)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("video resolution values must be greater than 0"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user