]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: validate: Validate maximum start time for <clock offset='absolute'>
authorPeter Krempa <pkrempa@redhat.com>
Thu, 3 Nov 2022 15:04:17 +0000 (16:04 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 4 Nov 2022 08:54:33 +0000 (09:54 +0100)
commit9acd9fa7336fbc910b92254f40be7570a353e4c9
tree47af1757e94a9d8fcdba49d25a4c023184bd5629
parentcca6787b15ed0b5a7ebbdfe0a522cacb1cc02a66
qemu: validate: Validate maximum start time for <clock offset='absolute'>

Glib can internally convert only unix timestamps up to
9999-12-31T23:59:59 (253402300799). Validate that the user doesn't use
more than that as otherwise we cause an assertion failure:

 (process:1183396): GLib-CRITICAL **: 14:25:00.906: g_date_time_format: assertion 'datetime != NULL' failed

Additionally adjust the schema to allow bigger values as we use
'unsigned long long' to parse the value.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2128993
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/schemas/domaincommon.rng
src/qemu/qemu_validate.c
tests/qemuxml2argvdata/clock-absolute.x86_64-latest.args
tests/qemuxml2argvdata/clock-absolute.xml
tests/qemuxml2xmloutdata/clock-absolute.x86_64-latest.xml