qemu restore: don't let corrupt input provoke unwarranted OOM
qemu restore: don't let corrupt input provoke unwarranted OOM

* src/qemu/qemu_driver.c (qemudDomainRestore): A corrupt save file
(in particular, a too-large header.xml_len value) would cause an
unwarranted out-of-memory error.  Do not trust the just-read
header.xml_len.  Instead, merely use that as a hint, and
read/allocate up to that number of bytes from the file.
Also verify that header.xml_len is positive; if it were negative,
passing it to virFileReadLimFD could cause trouble.

zippy2/libvirt,trainstack/libvirt,agx/libvirt,danwent/libvirt-ovs,andreabolognani/libvirt,emaste/libvirt,danwent/libvirt-ovs,siboulet/libvirt-openvz,leilihh/libvirt,olafhering/libvirt,rbu/libvirt,jardasgit/libvirt,dumbbell/libvirt,libvirt/libvirt,fabianfreyer/libvirt,wiedi/libvirt,kantai/libvirt-vfork,jeckersb/libvirt,cbosdo/libvirt,cbosdo/libvirt,VenkatDatta/libvirt,amery/libvirt-vserver,libvirt/libvirt,taget/libvirt,datto/libvirt,warewolf/libvirt,crobinso/libvirt,rbu/libvirt,fabianfreyer/libvirt,shugaoye/libvirt,rbu/libvirt,sshah-solarflare/Libvirt-PCI-passthrough-,zhlcindy/libvirt-1.1.4-maintain,olafhering/libvirt,rmarwaha/libvirt1,datto/libvirt,fabianfreyer/libvirt,VenkatDatta/libvirt,foomango/libvirt,shugaoye/libvirt,rmarwaha/libvirt,emaste/libvirt,rbu/libvirt,libvirt/libvirt,taget/libvirt,taget/libvirt,agx/libvirt,bjzhang/libvirt,bjzhang/libvirt,soulxu/libvirt-xuhj,emaste/libvirt,novel/fbsd-libvirt,bjzhang/libvirt,eskultety/libvirt,wiedi/libvirt,warewolf/libvirt,datto/libvirt,bjzhang/libvirt,kantai/libvirt-vfork,leilihh/libvirt,rmarwaha/libvirt1,novel/fbsd-libvirt,novel/fbsd-libvirt,emaste/libvirt,zippy2/libvirt,wiedi/libvirt,novel/fbsd-libvirt,trainstack/libvirt,shugaoye/libvirt,kantai/libvirt-vfork,sshah-solarflare/Libvirt-PCI-passthrough-,rmarwaha/libvirt,cbosdo/libvirt,jeckersb/libvirt,leilihh/libvirt,zippy2/libvirt,nertpinx/libvirt,shugaoye/libvirt,wiedi/libvirt,rmarwaha/libvirt1,sshah-solarflare/Libvirt-PCI-passthrough-,novel/fbsd-libvirt,warewolf/libvirt,usc-isi/libvirt,jeckersb/libvirt,siboulet/libvirt-openvz,iam-TJ/libvirt,wiedi/libvirt,dumbbell/libvirt,jeckersb/libvirt,jardasgit/libvirt,leilihh/libvirt,nertpinx/libvirt,nertpinx/libvirt,andreabolognani/libvirt,eskultety/libvirt,sshah-solarflare/Libvirt-PCI-passthrough-,rmarwaha/libvirt,agx/libvirt,zhlcindy/libvirt-1.1.4-maintain,olafhering/libvirt,wiedi/libvirt,nertpinx/libvirt,iam-TJ/libvirt,iam-TJ/libvirt,andreabolognani/libvirt,iam-TJ/libvirt,VenkatDatta/libvirt,zhlcindy/libvirt-1.1.4-maintain,soulxu/libvirt-xuhj,bjzhang/libvirt,trainstack/libvirt,VenkatDatta/libvirt,jfehlig/libvirt,elmarco/libvirt,jeckersb/libvirt,emaste/libvirt,siboulet/libvirt-openvz,dumbbell/libvirt,rbu/libvirt,warewolf/libvirt,jeckersb/libvirt,amery/libvirt-vserver,siboulet/libvirt-openvz,novel/fbsd-libvirt,foomango/libvirt,sshah-solarflare/Libvirt-PCI-passthrough-,emaste/libvirt,soulxu/libvirt-xuhj,jfehlig/libvirt,novel/fbsd-libvirt,leilihh/libvirt,datto/libvirt,elmarco/libvirt,elmarco/libvirt,jfehlig/libvirt,warewolf/libvirt,zhlcindy/libvirt-1.1.4-maintain,rlaager/libvirt,soulxu/libvirt-xuhj,kantai/libvirt-vfork,eskultety/libvirt,jeckersb/libvirt,elmarco/libvirt,dumbbell/libvirt,rlaager/libvirt,zhlcindy/libvirt-1.1.4-maintain,amery/libvirt-vserver,novel/fbsd-libvirt,novel/fbsd-libvirt,warewolf/libvirt,cbosdo/libvirt,cbosdo/libvirt,trainstack/libvirt,danwent/libvirt-ovs,jardasgit/libvirt,emaste/libvirt,usc-isi/libvirt,jardasgit/libvirt,rlaager/libvirt,trainstack/libvirt,rmarwaha/libvirt1,trainstack/libvirt,nertpinx/libvirt,danwent/libvirt-ovs,libvirt/libvirt,usc-isi/libvirt,dumbbell/libvirt,taget/libvirt,andreabolognani/libvirt,iam-TJ/libvirt,elmarco/libvirt,danwent/libvirt-ovs,olafhering/libvirt,shugaoye/libvirt,rmarwaha/libvirt,crobinso/libvirt,leilihh/libvirt,rlaager/libvirt,datto/libvirt,wiedi/libvirt,andreabolognani/libvirt,rmarwaha/libvirt1,amery/libvirt-vserver,foomango/libvirt,zippy2/libvirt,soulxu/libvirt-xuhj,eskultety/libvirt,foomango/libvirt,iam-TJ/libvirt,foomango/libvirt,rmarwaha/libvirt,usc-isi/libvirt,usc-isi/libvirt,amery/libvirt-vserver,kantai/libvirt-vfork,agx/libvirt,crobinso/libvirt,rmarwaha/libvirt,taget/libvirt,rlaager/libvirt,fabianfreyer/libvirt,warewolf/libvirt,jfehlig/libvirt,rmarwaha/libvirt1,dumbbell/libvirt,siboulet/libvirt-openvz,eskultety/libvirt,trainstack/libvirt,agx/libvirt,iam-TJ/libvirt,VenkatDatta/libvirt,jardasgit/libvirt,crobinso/libvirt,fabianfreyer/libvirt