6458811 qemu: domain: Prevent overflows in memory alignment code

Authored and Committed by Peter Krempa 8 years ago
    qemu: domain: Prevent overflows in memory alignment code
    
    Since libvirt for dubious historical reasons stores memory size as
    kibibytes, it's possible that the alignments done in the qemu code
    overflow the the maximum representable size in bytes. The XML parser
    code handles them in bytes in some stages. Prevent this by doing
    overflow checks when alinging the size and add a test case.
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1260576
    
        
file modified
+27 -0
file modified
+1 -0