[evince] [print] Fixes segmentation violation when format is empty
- From: Nickolay V. Shmyrev <nshmyrev src gnome org>
- To: svn-commits-list gnome org
- Subject: [evince] [print] Fixes segmentation violation when format is empty
- Date: Sat, 25 Jul 2009 00:23:04 +0000 (UTC)
commit cc3f21efc8104182171c9300facc16d9a79177ef
Author: Andreas Liebe <liebe hrz tu-darmstadt de>
Date: Sat Jul 25 04:21:59 2009 +0400
[print] Fixes segmentation violation when format is empty
Where the printf functions do not accept NULL for %s. Fixes GNOME bug #589226.
shell/ev-print-operation.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/shell/ev-print-operation.c b/shell/ev-print-operation.c
index efb00a9..4e78c3f 100644
--- a/shell/ev-print-operation.c
+++ b/shell/ev-print-operation.c
@@ -1148,7 +1148,7 @@ ev_print_operation_export_print_dialog_response_cb (GtkDialog *dial
file_format = gtk_print_settings_get (print_settings, GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT);
- filename = g_strdup_printf ("evince_print.%s.XXXXXX", file_format);
+ filename = g_strdup_printf ("evince_print.%s.XXXXXX", file_format != NULL ? file_format : "");
export->fd = g_file_open_tmp (filename, &export->temp_file, &error);
g_free (filename);
if (export->fd <= -1) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]