cb97426 virlogd: fix crash if log file exists and it's larger the maxlen

Authored and Committed by phrdina 8 years ago
    virlogd: fix crash if log file exists and it's larger the maxlen
    
    If for some reason there is an existing log file, that is larger then
    max length of log file, we need to rollover that file immediately.
    Trying to figure out how much data we could write will resolve in
    overflow of unsigned variable 'towrite' and this leads to segfault.
    
    Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
    
        
file modified
+6 -1
file modified
+45 -0