diff options
author | Rodrigo Moya <rodrigo@novell.com> | 2004-06-04 01:54:24 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2004-06-04 01:54:24 +0800 |
commit | 6c4c85bd28d77115622bf384a61768ee5358ab93 (patch) | |
tree | 6cb9ec5afdd7641af03cc6158e712a02610524f8 /calendar | |
parent | b3f5c26f5cc5621ec416418952924a709bbc584a (diff) | |
download | gsoc2013-evolution-6c4c85bd28d77115622bf384a61768ee5358ab93.tar.gz gsoc2013-evolution-6c4c85bd28d77115622bf384a61768ee5358ab93.tar.zst gsoc2013-evolution-6c4c85bd28d77115622bf384a61768ee5358ab93.zip |
don't use vsprintf with NULL strings, crashes on FreeBSD.
2004-06-03 Rodrigo Moya <rodrigo@novell.com>
* gui/e-tasks.c (set_status_message): don't use vsprintf with
NULL strings, crashes on FreeBSD.
svn path=/trunk/; revision=26176
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 3 | ||||
-rw-r--r-- | calendar/gui/e-tasks.c | 15 |
2 files changed, 12 insertions, 6 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index f447654950..9a9e8a5502 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,5 +1,8 @@ 2004-06-03 Rodrigo Moya <rodrigo@novell.com> + * gui/e-tasks.c (set_status_message): don't use vsprintf with + NULL strings, crashes on FreeBSD. + * gui/dialogs/comp-editor-page.c (comp_editor_page_notify_client_changed): update the internal client when it changes. diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c index 947cf60a11..56d9709d12 100644 --- a/calendar/gui/e-tasks.c +++ b/calendar/gui/e-tasks.c @@ -679,15 +679,18 @@ set_status_message (ETasks *tasks, const char *message, ...) { ETasksPrivate *priv; va_list args; - char sz[2048]; - - va_start (args, message); - vsnprintf (sz, sizeof sz, message, args); - va_end (args); + char sz[2048], *msg_string = NULL; + + if (message) { + va_start (args, message); + vsnprintf (sz, sizeof sz, message, args); + va_end (args); + msg_string = sz; + } priv = tasks->priv; - e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->tasks_view), sz); + e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->tasks_view), msg_string); } /* Callback from the calendar client when an error occurs in the backend */ |