]> git.ipfire.org Git - thirdparty/libvirt.git/commit
internal: Refuse values exceeding range of 'unsigned int' in virCheckFlags
authorPeter Krempa <pkrempa@redhat.com>
Tue, 22 Nov 2022 10:44:50 +0000 (11:44 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 2 Dec 2022 15:18:37 +0000 (16:18 +0100)
commitbfc188e82c3059585fa564a18d76dc70ce6e903d
tree5924025ecec5bb0887e579977ebb273ab47ffb3c
parent35e36f9e29cd0dda2719423ec8a41231acd40042
internal: Refuse values exceeding range of 'unsigned int' in virCheckFlags

Historically our migration APIs declare 'unsigned long flags'. Since
it's baked into our API we can't change that but we can avoid
compatibility problems by preemptively refusing the extra range on
certain arches to prevent future surprise.

Modify the macro to verify that value passed inside 'flags' doesn't
exceed the range of 'unsigned int'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/internal.h