]> granicus.if.org Git - sysstat/commit
Fix #202: Infinite loop in sadf
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 2 Dec 2018 16:45:58 +0000 (17:45 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 2 Dec 2018 16:45:58 +0000 (17:45 +0100)
commit6886152fb3af82376318c35eda416c3ce611121d
tree330b6a7882a4fa5469b5589c8d02425aa730df65
parentac45c1baaf21ecd0a5db52587fd381a3b3197b25
Fix #202: Infinite loop in sadf

Check that structure's size is greater than 0 even for
unknown activities.
Else trying to skip this unknown activity in read_file_stat_bunch()
function will decrease offset pointer in file and result in an
infinite loop:

offset = (off_t) fal->size * (off_t) nr_value * (off_t) fal->nr2;

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
sa_common.c