• J
    qemu restore: don't let corrupt input provoke unwarranted OOM · 1a4d5c95
    Jim Meyering 提交于
    * 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.
    1a4d5c95
qemu_driver.c 287.6 KB