]> git.pld-linux.org Git - packages/ggz-gtk-games.git/commitdiff
- added format patch (fixes build with -Werror=format-security) auto/th/ggz-gtk-games-0.0.14.1-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 3 Feb 2013 07:26:26 +0000 (08:26 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 3 Feb 2013 07:26:26 +0000 (08:26 +0100)
ggz-gtk-games-format.patch [new file with mode: 0644]
ggz-gtk-games.spec

diff --git a/ggz-gtk-games-format.patch b/ggz-gtk-games-format.patch
new file mode 100644 (file)
index 0000000..aec56bd
--- /dev/null
@@ -0,0 +1,74 @@
+--- ggz-gtk-games-0.0.14.1/common/ggz_gtk.c.orig       2008-01-05 19:59:42.000000000 +0100
++++ ggz-gtk-games-0.0.14.1/common/ggz_gtk.c    2013-02-03 08:15:42.901064436 +0100
+@@ -73,8 +73,7 @@ GGZMod *init_ggz_gtk(GtkWindow * main_wi
+       GGZMod *mod;
+       if (!ggzmod_is_ggz_mode()) {
+-              printf(_("This program should only be run from within GGZ."));
+-              printf("\n");
++              puts(_("This program should only be run from within GGZ."));
+               exit(1);
+       }
+--- ggz-gtk-games-0.0.14.1/dots/game.c.orig    2008-01-05 19:59:50.000000000 +0100
++++ ggz-gtk-games-0.0.14.1/dots/game.c 2013-02-03 08:21:46.257849136 +0100
+@@ -219,7 +219,7 @@ void board_handle_click(GtkWidget * widg
+               if (ggz_write_int(game.fd, DOTS_SND_MOVE_V) < 0
+                   || ggz_write_char(game.fd, line_x) < 0
+                   || ggz_write_char(game.fd, top) < 0) {
+-                      ggz_error_msg(_("Lost server connection"));
++                      ggz_error_msg("%s", _("Lost server connection"));
+                       exit(1);
+               }
+       } else {
+@@ -244,7 +244,7 @@ void board_handle_click(GtkWidget * widg
+               if (ggz_write_int(game.fd, DOTS_SND_MOVE_H) < 0
+                   || ggz_write_char(game.fd, left) < 0
+                   || ggz_write_char(game.fd, line_y) < 0) {
+-                      ggz_error_msg(_("Lost server connection"));
++                      ggz_error_msg("%s", _("Lost server connection"));
+                       exit(1);
+               }
+       }
+--- ggz-gtk-games-0.0.14.1/dots/main.c.orig    2013-02-02 22:43:12.146613317 +0100
++++ ggz-gtk-games-0.0.14.1/dots/main.c 2013-02-03 08:22:08.785557229 +0100
+@@ -360,7 +360,7 @@ static int get_move_status(void)
+       }
+       if (status < 0)
+-              ggz_error_msg(_("Client cheater!"));
++              ggz_error_msg("%s", _("Client cheater!"));
+       return (int)status;
+ }
+--- ggz-gtk-games-0.0.14.1/ggzcards/game.c.orig        2008-01-05 19:59:47.000000000 +0100
++++ ggz-gtk-games-0.0.14.1/ggzcards/game.c     2013-02-03 08:22:57.504476107 +0100
+@@ -289,7 +289,7 @@ void game_handle_gameover(int num_winner
+       /* handle different cases */
+       if (num_winners == 0)
+-              snprintf(msg, sizeof(msg), _("There was no winner."));
++              snprintf(msg, sizeof(msg), "%s", _("There was no winner."));
+       else {
+               int i;
+               for (i = 0; i < num_winners; i++) {
+@@ -306,7 +306,7 @@ void game_handle_gameover(int num_winner
+                                sizeof(msg) - strlen(msg), fmt,
+                                ggzcards.players[winners[i]].name);
+               }
+-              snprintf(msg + strlen(msg), sizeof(msg) - strlen(msg),
++              snprintf(msg + strlen(msg), sizeof(msg) - strlen(msg), "%s",
+                        _("won the game."));
+       }
+--- ggz-gtk-games-0.0.14.1/spades/gtk_io.c.orig        2008-01-05 19:59:38.000000000 +0100
++++ ggz-gtk-games-0.0.14.1/spades/gtk_io.c     2013-02-03 08:23:39.799764696 +0100
+@@ -430,7 +430,7 @@ void DisplayScores(void)
+                                                   gameState.bids[i + 2]);
+                       }
+               } else {
+-                      buf = g_strdup_printf(_("  Bid:  "));
++                      buf = g_strdup_printf("%s", _("  Bid:  "));
+               }
+               gtk_label_set_text(GTK_LABEL(playArea->bids[i]), buf);
index f4f36df3b8de2cc801a1265825ffa1ed06a33d49..36bd66c5b220d5e12f2af2ce9d03b550f9e24581 100644 (file)
@@ -8,6 +8,7 @@ Group:          X11/Applications/Games
 Source0:       http://mirrors.dotsrc.org/ggzgamingzone/ggz/%{version}/%{name}-%{version}.tar.gz
 # Source0-md5: 72049279f3f2d1a0a0b5196331867754
 Patch0:                %{name}-nls-domains.patch
+Patch1:                %{name}-format.patch
 URL:           http://www.ggzgamingzone.org/
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
@@ -31,6 +32,7 @@ Ten pakiet to klient GGZ dla środowiska GNOME.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__aclocal} -I m4 -I m4/ggz
This page took 0.03837 seconds and 4 git commands to generate.