Re: [PATCH] virlogd: fix crash if log file exists and it's larger the maxlen

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 30, 2015 at 08:50:16AM +0100, Martin Kletzander wrote:
> On Mon, Nov 30, 2015 at 08:31:15AM +0100, Pavel Hrdina wrote:
> >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@xxxxxxxxxx>
> >---
> > src/util/virrotatingfile.c | 7 ++++++-
> > 1 file changed, 6 insertions(+), 1 deletion(-)
> >
> 
> Makes sense, ACK.  Would you care to add a test in the
> tests/virrotatingfiletest.c file?  Thanks.

Sure, I'll add a test too, thanks.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]