diff --git a/ChangeLog b/ChangeLog index 44e1d9990..29da03d0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -49,6 +49,8 @@ - TW-1302 CmdShow.cpp:244: bad length in substr ? (thanks to David Binderman). - TW-1304 Minor build and install fix for NetBSD (thanks to atomicules). - TW-1307 burndown is aliased to burndown.weekly (thanks to darkfeline). +- TW-1309 memory error, if misconfigured calendar.details.report (thanks to + Onion). - Removed deprecated 'echo.command' setting, in favor of the 'header' and 'affected' verbosity tokens. - Removed deprecated 'edit.verbose' setting, in favor of the 'edit' verbosity diff --git a/src/commands/CmdCalendar.cpp b/src/commands/CmdCalendar.cpp index 484710b73..189bfe0ee 100644 --- a/src/commands/CmdCalendar.cpp +++ b/src/commands/CmdCalendar.cpp @@ -331,7 +331,11 @@ int CmdCalendar::execute (std::string& output) // Table with due date information if (context.config.get ("calendar.details") == "full") { + // Assert that 'report' is a valid report. std::string report = context.config.get ("calendar.details.report"); + if (context.commands.find (report) == context.commands.end ()) + throw std::string (STRING_ERROR_DETAILS); + std::string report_filter = context.config.get ("report." + report + ".filter"); context.a3.clear (); diff --git a/src/eng-USA.h b/src/eng-USA.h index 7d4f9f20d..77c8ae878 100644 --- a/src/eng-USA.h +++ b/src/eng-USA.h @@ -691,6 +691,7 @@ #define STRING_INVALID_SORT_COL "The '{1}' column is not a valid sort field." #define STRING_TLS_INIT_FAIL "Error initializing TLS." #define STRING_ERROR_MEMORY "Problem obtaining memory." +#define STRING_ERROR_DETAILS "The setting 'calendar.details.report' must contain a single report name." // Feedback #define STRING_FEEDBACK_NO_TASKS "No tasks." diff --git a/src/esp-ESP.h b/src/esp-ESP.h index 0ed69b758..5b50ef81a 100644 --- a/src/esp-ESP.h +++ b/src/esp-ESP.h @@ -704,6 +704,7 @@ #define STRING_INVALID_SORT_COL "La columna '{1}' no es un campo de ordenación válido." #define STRING_TLS_INIT_FAIL "Error inicializando TLS." #define STRING_ERROR_MEMORY "Problem obtaining memory." +#define STRING_ERROR_DETAILS "The setting 'calendar.details.report' must contain a single report name." // Feedback #define STRING_FEEDBACK_NO_TASKS "Ninguna tarea." diff --git a/src/fra-FRA.h b/src/fra-FRA.h index 52506c0d1..ccc2a62fe 100644 --- a/src/fra-FRA.h +++ b/src/fra-FRA.h @@ -690,6 +690,7 @@ #define STRING_INVALID_SORT_COL "The '{1}' column is not a valid sort field." #define STRING_TLS_INIT_FAIL "Error initializing TLS." #define STRING_ERROR_MEMORY "Problem obtaining memory." +#define STRING_ERROR_DETAILS "The setting 'calendar.details.report' must contain a single report name." // Feedback #define STRING_FEEDBACK_NO_TASKS "No tasks." diff --git a/src/ita-ITA.h b/src/ita-ITA.h index 3cd506732..f41bb8e2a 100644 --- a/src/ita-ITA.h +++ b/src/ita-ITA.h @@ -691,6 +691,7 @@ #define STRING_INVALID_SORT_COL "La colonna '{1}' non è un campo di ordinamento valido." #define STRING_TLS_INIT_FAIL "Error initializing TLS." #define STRING_ERROR_MEMORY "Problem obtaining memory." +#define STRING_ERROR_DETAILS "The setting 'calendar.details.report' must contain a single report name." // Feedback #define STRING_FEEDBACK_NO_TASKS "Nessun task." diff --git a/src/por-PRT.h b/src/por-PRT.h index 6fc541ccb..af282d374 100644 --- a/src/por-PRT.h +++ b/src/por-PRT.h @@ -691,6 +691,7 @@ #define STRING_INVALID_SORT_COL "A coluna '{1}' não pode ser ordenada." #define STRING_TLS_INIT_FAIL "Erro a iniciar componente TLS." #define STRING_ERROR_MEMORY "Problem obtaining memory." +#define STRING_ERROR_DETAILS "The setting 'calendar.details.report' must contain a single report name." // Feedback #define STRING_FEEDBACK_NO_TASKS "Nenhuma tarefa."