Hello, as I am currently going through NM, and one of my tasks was to try to fix a bug and prepare a NMU, my AM suggested that i might as well upload the result. Please see the attached debdiff, fixing #767584.
Regards, Simon
diff -Nru apt-dater-1.0.1/debian/changelog apt-dater-1.0.1/debian/changelog --- apt-dater-1.0.1/debian/changelog 2014-10-31 19:56:43.000000000 +0000 +++ apt-dater-1.0.1/debian/changelog 2014-11-20 12:59:54.000000000 +0000 @@ -1,3 +1,11 @@ +apt-dater (1.0.1-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Fixes segfaults when a dot is used in the config file + as part of the host identifier (Closes: #767584) + + -- Simon Kainz <si...@familiekainz.at> Thu, 20 Nov 2014 13:47:38 +0100 + apt-dater (1.0.1-1) unstable; urgency=medium * New upstream release. diff -Nru apt-dater-1.0.1/debian/patches/00_fix_segfaults_when_dot_in_conffile.patch apt-dater-1.0.1/debian/patches/00_fix_segfaults_when_dot_in_conffile.patch --- apt-dater-1.0.1/debian/patches/00_fix_segfaults_when_dot_in_conffile.patch 1970-01-01 00:00:00.000000000 +0000 +++ apt-dater-1.0.1/debian/patches/00_fix_segfaults_when_dot_in_conffile.patch 2014-11-20 13:03:56.000000000 +0000 @@ -0,0 +1,83 @@ +Description: Fix segfaults if dots are used in the config file + +This patch fixes the segault issue by using g_printerr() in favor +of g_error(), because the latter is used to report fatal errors (e.g +assertion failures), followed by a core dump. + +Author: Simon Kainz <si...@familiekainz.at> +Bug-Debian: https://bugs.debian.org/767584 + +--- + +--- apt-dater-1.0.1.orig/src/apt-dater.c ++++ apt-dater-1.0.1/src/apt-dater.c +@@ -123,7 +123,7 @@ int main(int argc, char **argv, char **e + cfg = initialConfig(); + + if(!(loadConfig(cfgfilename, cfg))) { +- g_error(_("Error on loading config file %s\n"), cfgfilename); ++ g_printerr(_("Error on loading config file %s\n"), cfgfilename); + exit(EXIT_FAILURE); + } + +--- apt-dater-1.0.1.orig/src/keyfiles.c ++++ apt-dater-1.0.1/src/keyfiles.c +@@ -151,9 +151,9 @@ gboolean loadConfig(char *filename, CfgF + if(config_read_file(&hcfg, filename) == CONFIG_FALSE) { + #ifdef HAVE_LIBCONFIG_ERROR_MACROS + const char *efn = config_error_file(&hcfg); +- g_error ("Error reading config file [%s:%d]: %s", (efn ? efn : filename), config_error_line(&hcfg), config_error_text(&hcfg)); ++ g_printerr ("Error reading config file [%s:%d]: %s\n", (efn ? efn : filename), config_error_line(&hcfg), config_error_text(&hcfg)); + #else +- g_error ("Error reading config file %s!", filename); ++ g_printerr ("Error reading config file %s!\n", filename); + #endif + config_destroy(&hcfg); + return (FALSE); +@@ -197,14 +197,14 @@ gboolean loadConfig(char *filename, CfgF + + h = NULL; + if(config_setting_lookup_string(s_ssh, "Cmd", (const char **) &h) == CONFIG_FALSE) { +- g_error ("%s: Config option SSH.Cmd not set!", filename); ++ g_printerr ("%s: Config option SSH.Cmd not set!", filename); + return (FALSE); + } + lcfg->ssh_cmd = g_strdup(h); + + h = NULL; + if(config_setting_lookup_string(s_ssh, "SFTPCmd", (const char **) &h) == CONFIG_FALSE) { +- g_error ("%s: Config option SSH.SFTPCmd not set!", filename); ++ g_printerr ("%s: Config option SSH.SFTPCmd not set!", filename); + return (FALSE); + } + lcfg->sftp_cmd = g_strdup(h); +@@ -228,7 +228,7 @@ gboolean loadConfig(char *filename, CfgF + } + } + else { +- g_error ("%s: setting %s must be a single string or an array of strings", filename, config_setting_name(s_addkeys)); ++ g_printerr ("%s: setting %s must be a single string or an array of strings", filename, config_setting_name(s_addkeys)); + } + } + +@@ -295,9 +295,9 @@ GList *loadHosts (const char *filename) + if(config_read_file(&hcfg, filename) == CONFIG_FALSE) { + #ifdef HAVE_LIBCONFIG_ERROR_MACROS + const char *efn = config_error_file(&hcfg); +- g_error ("Error reading host file [%s:%d]: %s", (efn ? efn : filename), config_error_line(&hcfg), config_error_text(&hcfg)); ++ g_printerr ("Error reading host file [%s:%d]: %s\n", (efn ? efn : filename), config_error_line(&hcfg), config_error_text(&hcfg)); + #else +- g_error ("Error reading host file %s!", filename); ++ g_printerr ("Error reading host file %s!\n", filename); + #endif + config_destroy(&hcfg); + return (FALSE); +@@ -305,7 +305,7 @@ GList *loadHosts (const char *filename) + + config_setting_t *cfghosts = config_lookup(&hcfg, "Hosts"); + if(cfghosts == NULL) { +- g_error ("%s: No Hosts entries found.", filename); ++ g_printerr ("%s: No Hosts entries found.\n", filename); + config_destroy(&hcfg); + return (FALSE); + } diff -Nru apt-dater-1.0.1/debian/patches/series apt-dater-1.0.1/debian/patches/series --- apt-dater-1.0.1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ apt-dater-1.0.1/debian/patches/series 2014-11-20 12:52:45.000000000 +0000 @@ -0,0 +1 @@ +00_fix_segfaults_when_dot_in_conffile.patch