r15486 - packages/trunk/7kaa/debian/patches

Bertrand Marc bbk-guest at moszumanska.debian.org
Wed Jul 29 14:42:19 UTC 2015


Author: bbk-guest
Date: 2015-07-29 14:42:19 +0000 (Wed, 29 Jul 2015)
New Revision: 15486

Added:
   packages/trunk/7kaa/debian/patches/fix_format_security.diff
Modified:
   packages/trunk/7kaa/debian/patches/series
Log:
Add a patch picked upstream to fix build with -Werror=format-security.


Added: packages/trunk/7kaa/debian/patches/fix_format_security.diff
===================================================================
--- packages/trunk/7kaa/debian/patches/fix_format_security.diff	                        (rev 0)
+++ packages/trunk/7kaa/debian/patches/fix_format_security.diff	2015-07-29 14:42:19 UTC (rev 15486)
@@ -0,0 +1,77 @@
+Description: Fix failure with -Werror=format-security.
+Origin: https://github.com/the3dfxdude/7kaa/commit/a8eaf0d02a37202e6e41d77c5c57c936524d827f
+Author: Ding-Yi Chen
+--- a/src/client/ORACERES.cpp
++++ b/src/client/ORACERES.cpp
+@@ -27,7 +27,7 @@
+ #include <OUNITRES.h>
+ #include <ORACERES.h>
+ #include <locale.h>
+-#include "gettext.h"
++#include <gettext.h>
+ 
+ //---------- #define constant ------------//
+ 
+@@ -540,52 +540,52 @@
+ 	if( strncmp(adjective, "Norman", RaceInfo::ADJECTIVE_LEN) == 0 )
+ 	{
+ 		// TRANSLATORS: "the Norman Scroll of Power"
+-		snprintf( adjective, RaceInfo::ADJECTIVE_LEN+1, pgettext("Race Adjective", "Norman") );
++		strncpy( adjective, pgettext("Race Adjective", "Norman"), RaceInfo::ADJECTIVE_LEN+1 );
+ 	}
+ 	else if( strncmp(adjective, "Mayan", RaceInfo::ADJECTIVE_LEN) == 0 )
+ 	{
+ 		// TRANSLATORS: "the Mayan Scroll of Power"
+-		snprintf( adjective, RaceInfo::ADJECTIVE_LEN+1, pgettext("Race Adjective", "Mayan") );
++		strncpy( adjective, pgettext("Race Adjective", "Mayan"), RaceInfo::ADJECTIVE_LEN+1 );
+ 	}
+ 	else if( strncmp(adjective, "Greek", RaceInfo::ADJECTIVE_LEN) == 0 )
+ 	{
+ 		// TRANSLATORS: "the Greek Scroll of Power"
+-		snprintf( adjective, RaceInfo::ADJECTIVE_LEN+1, pgettext("Race Adjective", "Greek") );
++		strncpy( adjective, pgettext("Race Adjective", "Greek"), RaceInfo::ADJECTIVE_LEN+1 );
+ 	}
+ 	else if( strncmp(adjective, "Viking", RaceInfo::ADJECTIVE_LEN) == 0 )
+ 	{
+ 		// TRANSLATORS: "the Viking Scroll of Power"
+-		snprintf( adjective, RaceInfo::ADJECTIVE_LEN+1, pgettext("Race Adjective", "Viking") );
++		strncpy( adjective, pgettext("Race Adjective", "Viking"), RaceInfo::ADJECTIVE_LEN+1 );
+ 	}
+ 	else if( strncmp(adjective, "Persian", RaceInfo::ADJECTIVE_LEN) == 0 )
+ 	{
+ 		// TRANSLATORS: "the Persian Scroll of Power"
+-		snprintf( adjective, RaceInfo::ADJECTIVE_LEN+1, pgettext("Race Adjective", "Persian") );
++		strncpy( adjective, pgettext("Race Adjective", "Persian"), RaceInfo::ADJECTIVE_LEN+1 );
+ 	}
+ 	else if( strncmp(adjective, "Chinese", RaceInfo::ADJECTIVE_LEN) == 0 )
+ 	{
+ 		// TRANSLATORS: "the Chinese Scroll of Power"
+-		snprintf( adjective, RaceInfo::ADJECTIVE_LEN+1, pgettext("Race Adjective", "Chinese") );
++		strncpy( adjective, pgettext("Race Adjective", "Chinese"), RaceInfo::ADJECTIVE_LEN+1 );
+ 	}
+ 	else if( strncmp(adjective, "Japanese", RaceInfo::ADJECTIVE_LEN) == 0 )
+ 	{
+ 		// TRANSLATORS: "the Japanese Scroll of Power"
+-		snprintf( adjective, RaceInfo::ADJECTIVE_LEN+1, pgettext("Race Adjective", "Japanese") );
++		strncpy( adjective, pgettext("Race Adjective", "Japanese"), RaceInfo::ADJECTIVE_LEN+1 );
+ 	}
+ 	else if( strncmp(adjective, "Egyptian", RaceInfo::ADJECTIVE_LEN) == 0 )
+ 	{
+ 		// TRANSLATORS: "the Egyptian Scroll of Power"
+-		snprintf( adjective, RaceInfo::ADJECTIVE_LEN+1, pgettext("Race Adjective", "Egyptian") );
++		strncpy( adjective, pgettext("Race Adjective", "Egyptian"), RaceInfo::ADJECTIVE_LEN+1 );
+ 	}
+ 	else if( strncmp(adjective, "Mughul", RaceInfo::ADJECTIVE_LEN) == 0 )
+ 	{
+ 		// TRANSLATORS: "the Mughul Scroll of Power"
+-		snprintf( adjective, RaceInfo::ADJECTIVE_LEN+1, pgettext("Race Adjective", "Mughul") );
++		strncpy( adjective, pgettext("Race Adjective", "Mughul"), RaceInfo::ADJECTIVE_LEN+1 );
+ 	}
+ 	else if( strncmp(adjective, "Zulu", RaceInfo::ADJECTIVE_LEN) == 0 )
+ 	{
+ 		// TRANSLATORS: "the Zulu Scroll of Power"
+-		snprintf( adjective, RaceInfo::ADJECTIVE_LEN+1, pgettext("Race Adjective", "Zulu") );
++		strncpy( adjective, pgettext("Race Adjective", "Zulu"), RaceInfo::ADJECTIVE_LEN+1 );
+ 	}
+ }
+ //---------- End of function translate_race_adjective -----------//

Modified: packages/trunk/7kaa/debian/patches/series
===================================================================
--- packages/trunk/7kaa/debian/patches/series	2015-07-29 14:40:49 UTC (rev 15485)
+++ packages/trunk/7kaa/debian/patches/series	2015-07-29 14:42:19 UTC (rev 15486)
@@ -1 +1,2 @@
 abs_dir.patch
+fix_format_security.diff




More information about the Pkg-games-commits mailing list