[packages/tigervnc] - fix -Wformat-security errors

baggins baggins at pld-linux.org
Sun Sep 23 19:55:28 CEST 2012


commit 78f92ab6c899f9bf7fa0ec5cb2767347e6733c29
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Sep 23 19:54:02 2012 +0200

    - fix -Wformat-security errors

 format-security.patch | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)
---
diff --git a/format-security.patch b/format-security.patch
new file mode 100644
index 0000000..edb7bdf
--- /dev/null
+++ b/format-security.patch
@@ -0,0 +1,65 @@
+--- tigervnc-1.2.0/vncviewer/CConn.cxx~	2011-11-15 13:13:37.000000000 +0100
++++ tigervnc-1.2.0/vncviewer/CConn.cxx	2012-09-23 13:24:39.673278615 +0200
+@@ -100,7 +100,7 @@
+     vlog.info(_("connected to host %s port %d"), serverHost, serverPort);
+   } catch (rdr::Exception& e) {
+     vlog.error(e.str());
+-    fl_alert(e.str());
++    fl_alert("%s", e.str());
+     exit_vncviewer();
+     return;
+   }
+--- tigervnc-1.2.0/vncviewer/UserDialog.cxx~	2012-09-23 13:22:47.929949225 +0200
++++ tigervnc-1.2.0/vncviewer/UserDialog.cxx	2012-09-23 13:25:45.533276293 +0200
+@@ -167,16 +167,16 @@
+ 
+   switch (flags & 0xf) {
+   case M_OKCANCEL:
+-    return fl_choice(buffer, NULL, fl_ok, fl_cancel) == 1;
++    return fl_choice("%s", buffer, NULL, fl_ok, fl_cancel) == 1;
+   case M_YESNO:
+-    return fl_choice(buffer, NULL, fl_yes, fl_no) == 1;
++    return fl_choice("%s", buffer, NULL, fl_yes, fl_no) == 1;
+   case M_OK:
+   default:
+     if (((flags & 0xf0) == M_ICONERROR) ||
+         ((flags & 0xf0) == M_ICONWARNING))
+-      fl_alert(buffer);
++      fl_alert("%s", buffer);
+     else
+-      fl_message(buffer);
++      fl_message("%s", buffer);
+     return true;
+   }
+ 
+--- tigervnc-1.2.0/vncviewer/Viewport.cxx~	2012-01-05 13:37:04.000000000 +0100
++++ tigervnc-1.2.0/vncviewer/Viewport.cxx	2012-09-23 13:26:09.889942100 +0200
+@@ -950,7 +950,7 @@
+   case ID_INFO:
+     if (fltk_escape(cc->connectionInfo(), buffer, sizeof(buffer)) < sizeof(buffer)) {
+       fl_message_title(_("VNC connection info"));
+-      fl_message(buffer);
++      fl_message("%s", buffer);
+     }
+     break;
+   case ID_ABOUT:
+--- tigervnc-1.2.0/vncviewer/vncviewer.cxx~	2011-10-12 22:02:55.000000000 +0200
++++ tigervnc-1.2.0/vncviewer/vncviewer.cxx	2012-09-23 13:26:46.729940794 +0200
+@@ -86,7 +86,7 @@
+ void about_vncviewer()
+ {
+   fl_message_title(_("About TigerVNC Viewer"));
+-  fl_message(aboutText);
++  fl_message("%s", aboutText);
+ }
+ 
+ static void about_callback(Fl_Widget *widget, void *data)
+@@ -311,7 +311,7 @@
+   delete cc;
+ 
+   if (exitError != NULL)
+-    fl_alert(exitError);
++    fl_alert("%s", exitError);
+ 
+   return 0;
+ }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/tigervnc.git/commitdiff/18151d729c9bfddd4256a4f27b8b4b4756e411e3



More information about the pld-cvs-commit mailing list