mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-09 23:10:08 +00:00
a57195e79e
When removing rotated log files, their name is matched against a regex (@log_regex) and if they contain '.N' suffix the 'N' is then parsed into an integer. Well, due to a bug in virLogCleanerParseFilename() this is not how the code works. If the suffix isn't found then g_match_info_fetch() returns an empty string instead of NULL which then makes str2int parsing fail. Just check for this case before parsing the string. Based on the original patch sent by David. Reported-by: David Negreira <david.negreira@canonical.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com> |
||
---|---|---|
.. | ||
log_cleaner.c | ||
log_cleaner.h | ||
log_daemon_config.c | ||
log_daemon_config.h | ||
log_daemon_dispatch.c | ||
log_daemon_dispatch.h | ||
log_daemon.c | ||
log_daemon.h | ||
log_handler.c | ||
log_handler.h | ||
log_manager.c | ||
log_manager.h | ||
log_protocol.x | ||
meson.build | ||
test_virtlogd.aug.in | ||
virtlogd-admin.socket.in | ||
virtlogd.aug | ||
virtlogd.conf | ||
virtlogd.init.in | ||
virtlogd.service.extra.in | ||
virtlogd.service.in | ||
virtlogd.socket.extra.in | ||
virtlogd.socket.in |