9878436 storage: Fix crash when parsing backing store URI with schema

Authored and Committed by Peter Krempa 9 years ago
    storage: Fix crash when parsing backing store URI with schema
    
    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
    
        
file modified
+5 -5
file modified
+25 -6