]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: block: Validate node-names for use with qemu
authorPeter Krempa <pkrempa@redhat.com>
Wed, 28 Mar 2018 07:04:49 +0000 (09:04 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 7 May 2018 13:33:38 +0000 (15:33 +0200)
commit58505900c519db188a0a5166e960b712ace8ac4c
treefb0c9365aa6f8cf504aa374a24cf5027f7611e65
parentd94aa38ffb225965bb30f9cd05ec195f364c3331
qemu: block: Validate node-names for use with qemu

qemu declares node-name as a 32 byte buffer and silently truncates
anything longer than that. This is unacceptable for libvirt, so we need
to make sure that we won't ever supply a node-name exceeding 31 chars.

Add a function which will do the validation and use it to validate
storage-protocol node names.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_block.c