• P
    storage: Fix crash when parsing backing store URI with schema · 98784369
    Peter Krempa 提交于
    The code that parses the schema from the URI touches the "hosts[0]"
    member of the storage file source structure in case the URI contains a
    schema. The hosts array was not yet allocated at the point in the code
    where the transport protocol was parsed and set. This lead to a crash of
    libvirtd.
    
    Fix the code by allocating the "hosts" array upfront and add a test case
    to verify this scenario. (Unfortunately this requires shuffling the test
    case numbers too).
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1156288
    98784369
virstoragetest.c 43.1 KB