[libvirt] [libvirt-php 1/3] add some checks to prevent overflow