
30 Nov
2015
30 Nov
'15
3:10 a.m.
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@redhat.com> --- 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.