From e2fe1bdf6fd968256c28065aa25b86a6e8440789 Mon Sep 17 00:00:00 2001 From: Bill Meier Date: Mon, 9 Mar 2009 17:08:38 +0000 Subject: Use "wshprint" (instead of "ethprint") for prefix of temp file name; Also: add to comment about non-use of tmpnam svn path=/trunk/; revision=27679 --- gtk/print_dlg.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gtk/print_dlg.c') diff --git a/gtk/print_dlg.c b/gtk/print_dlg.c index dddc7a4776..cb9aff2a2f 100644 --- a/gtk/print_dlg.c +++ b/gtk/print_dlg.c @@ -945,13 +945,13 @@ print_ok_cb(GtkWidget *ok_bt, gpointer parent_w) #ifdef _WIN32 win_printer = TRUE; /* We currently don't have a function in util.h to create just a tempfile */ - /* name, so simply create a tempfile using the "official" function, */ - /* then delete this file again. After this, the name MUST be available. */ + /* name, so simply create a tempfile using the "official" function, */ + /* then delete this file again. After this, the name MUST be available. */ /* */ - /* Don't use tmpnam() or such, as this will fail under some ACL */ - /* circumstances: http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=358 */ - - tmp_fd = create_tempfile(tmp_namebuf, sizeof(tmp_namebuf), "ethprint"); + /* Don't use tmpnam() or such, as this will fail under some ACL */ + /* circumstances: http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=358 */ + /* Also: tmpnam is "insecure" and should not be used. */ + tmp_fd = create_tempfile(tmp_namebuf, sizeof(tmp_namebuf), "wshprint"); if(tmp_fd == -1) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "Couldn't create a temporary file for printing."); -- cgit v1.2.3