diff --git a/CHANGELOG b/CHANGELOG index ddc6e0b..5b094bd 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +0.5.12 2020-12-03 +* fix SEGV when directory are created in watched directories 0.5.12 2015-02-01 * added recursive directory watching * added configuration parameters: recursive, dotdirs and loopable diff --git a/Doxyfile b/Doxyfile index 759a4bc..b905a6c 100644 --- a/Doxyfile +++ b/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = incron # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 0.5.12 +PROJECT_NUMBER = 0.5.13 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/VERSION b/VERSION index 9d6c175..964783a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.12 +0.5.13 diff --git a/debian/changelog b/debian/changelog index ccd80f8..5025579 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +incron (0.5.13-1) unstable; urgency=medium + + * fixed bug #36 where incrond could die with SEGV. + (Closes: #973927) + (Closes: #947425) + + -- Schplurtz le Déboulonné Thu, 03 Dec 2020 10:11:32 +0100 + incron (0.5.12-1) unstable; urgency=medium * linked homepage, watch-file and bugtracker to changes upstream on github diff --git a/incron.conf.5 b/incron.conf.5 index 65bcdb7..5b954ca 100644 --- a/incron.conf.5 +++ b/incron.conf.5 @@ -1,4 +1,4 @@ -.TH "incron.conf" "5" "0.5.12" "Lukas Jelinek" "incron documentation" +.TH "incron.conf" "5" "0.5.13" "Lukas Jelinek" "incron documentation" .SH "NAME" /etc/incron.conf \- main config file for inotify cron (incron) .SH "DESCRIPTION" diff --git a/incron.h b/incron.h index 385ad0f..2ab0d86 100644 --- a/incron.h +++ b/incron.h @@ -28,7 +28,7 @@ #define INCRONTAB_NAME "incrontab" /// Application version (release) -#define INCRON_VERSION "0.5.12" +#define INCRON_VERSION "0.5.13" /// Default configuration file #define INCRON_CONFIG "/etc/incron.conf" diff --git a/incrond.8 b/incrond.8 index cffe80e..f613975 100644 --- a/incrond.8 +++ b/incrond.8 @@ -1,4 +1,4 @@ -.TH "incrond" "8" "0.5.12" "Lukas Jelinek" "incron documentation" +.TH "incrond" "8" "0.5.13" "Lukas Jelinek" "incron documentation" .SH "NAME" incrond \- inotify cron (incron) daemon diff --git a/incrontab.1 b/incrontab.1 index e767703..40aaa75 100644 --- a/incrontab.1 +++ b/incrontab.1 @@ -1,4 +1,4 @@ -.TH "incrontab" "1" "0.5.12" "Lukas Jelinek" "incron documentation" +.TH "incrontab" "1" "0.5.13" "Lukas Jelinek" "incron documentation" .SH "NAME" incrontab \- table manipulator for inotify cron (incron) .SH "SYNOPSIS" diff --git a/incrontab.5 b/incrontab.5 index d94ebe7..b216845 100644 --- a/incrontab.5 +++ b/incrontab.5 @@ -1,4 +1,4 @@ -.TH "incrontab" "5" "0.5.12" "Lukas Jelinek" "incron documentation" +.TH "incrontab" "5" "0.5.13" "Lukas Jelinek" "incron documentation" .SH "NAME" incrontab \- tables for driving inotify cron (incron) .SH "DESCRIPTION" diff --git a/usertable.cpp b/usertable.cpp index 11fd04b..f4710b6 100644 --- a/usertable.cpp +++ b/usertable.cpp @@ -386,6 +386,7 @@ void UserTable::OnEvent(InotifyEvent& rEvt) syslog(LOG_INFO, "PATH (%s) FILE (%s) EVENT (%s)", pW->GetPath().c_str() , IncronTabEntry::GetSafePath(rEvt.GetName()).c_str() , events.c_str()); //#endif + std::string WPath = pW->GetPath(); // FIXME: Should Dispose() be moved after "$@" param is treated ? // add new watch for newly created subdirs if ( rEvt.IsType(IN_ISDIR) && (rEvt.IsType(IN_CREATE) || rEvt.IsType(IN_MOVED_TO)) ) { @@ -422,7 +423,7 @@ void UserTable::OnEvent(InotifyEvent& rEvt) else { cmd.append(cs.substr(oldpos, pos-oldpos)); if (cs[px] == '@') { // base path - cmd.append(IncronTabEntry::GetSafePath(pW->GetPath())); + cmd.append(IncronTabEntry::GetSafePath(WPath)); oldpos = pos + 2; } else if (cs[px] == '#') { // file name