qemu: qapi: Limit traversal depth for QAPI schema queries
qemu: qapi: Limit traversal depth for QAPI schema queries

Implicitly the query depth is limited by the length of the QAPI schema
query, but 'alternate' and 'array' QAPI meta-types don't consume a part
of the query string thus a loop on such types would get our traversal
code stuck in an infinite loop. Prevent this from happening by limiting
the nesting depth to 1000.

Signed-off-by: Peter Krempa <2cf5c04c61aa466e4a47bfedc747d17279c72ffc@redhat.com>
Reviewed-by: Daniel P. Berrangé <bb938cf255e055ff3507f2627d214e8e62118fcf@redhat.com>

olafhering/libvirt,crobinso/libvirt,andreabolognani/libvirt,olafhering/libvirt,nertpinx/libvirt,crobinso/libvirt,jardasgit/libvirt,libvirt/libvirt,zippy2/libvirt,zippy2/libvirt,olafhering/libvirt,fabianfreyer/libvirt,fabianfreyer/libvirt,libvirt/libvirt,jfehlig/libvirt,libvirt/libvirt,jardasgit/libvirt,zippy2/libvirt,crobinso/libvirt,andreabolognani/libvirt,jfehlig/libvirt,jardasgit/libvirt,zippy2/libvirt,fabianfreyer/libvirt,jardasgit/libvirt,olafhering/libvirt,fabianfreyer/libvirt,jardasgit/libvirt,nertpinx/libvirt,nertpinx/libvirt,nertpinx/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,andreabolognani/libvirt,jfehlig/libvirt,andreabolognani/libvirt,jfehlig/libvirt,libvirt/libvirt,crobinso/libvirt,nertpinx/libvirt