• E
    qemu: avoid null pointer dereference · 4d080ee4
    Eric Blake 提交于
    This code has had problems historically.  As originally
    written, in commit 6bcf2501 (Jun 08), it could call unlink
    on a random string, nuking an unrelated file.
    
    Then commit 182a80b9 (Sep 09), the code was rewritten to
    allocate tmp, with both a use-after-free bug and a chance to
    call unlink(NULL).
    
    Commit e206946d (Mar 11) fixed the use-after-free, but not the
    NULL dereference.  Thanks to clang for catching this!
    
    * src/qemu/qemu_driver.c (qemudDomainMemoryPeek): Don't call
    unlink on NULL.
    4d080ee4
qemu_driver.c 217.0 KB