Blob Blame History Raw
From ee758b61cac0364eb0b759e769c8e675a9664acd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Tue, 3 Dec 2013 14:00:32 +0100
Subject: [PATCH] Pass compilation with -Wformat-security
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

<https://bugzilla.redhat.com/show_bug.cgi?id=1037009>

Signed-off-by: Petr Písař <ppisar@redhat.com>
---
 igs/board.cc       | 2 +-
 igs/player_list.cc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/igs/board.cc b/igs/board.cc
index 19f092e..17cd8d9 100644
--- a/igs/board.cc
+++ b/igs/board.cc
@@ -50,7 +50,7 @@ Glib::ustring Board::Record::to_str() const
 	char buf[100];
 	if (stop == STOP_DISCONNECT) snprintf(buf, 100, _("%s disconnected from the game.").c_str(), w.c_str());
 	else if (stop == STOP_ADJOURN) snprintf(buf, 100, _("%s adjourned the game.").c_str(), w.c_str());
-	else snprintf(buf, 100, _("The game is not marked.").c_str());
+	else snprintf(buf, 100, "%s", _("The game is not marked.").c_str());
 	return buf;
 }
 
diff --git a/igs/player_list.cc b/igs/player_list.cc
index f19e2c2..25c9421 100644
--- a/igs/player_list.cc
+++ b/igs/player_list.cc
@@ -748,7 +748,7 @@ void PlayerList::add_stored(const std::vector<Storage> & r)
 	text_area.get_buffer()->insert(text_area.get_buffer()->end(), "\n");
 	char buf[100];
 	if (r.size() > 1) snprintf(buf, 100, _("%d stored games").c_str(), r.size());
-	else snprintf(buf, 100, _("one stored game").c_str());
+	else snprintf(buf, 100, "%s", _("one stored game").c_str());
 	text_area.get_buffer()->insert(text_area.get_buffer()->end(), buf);
 	text_area.get_buffer()->insert(text_area.get_buffer()->end(), "\n");
 	if (at_bottom) {
-- 
1.8.3.1