diff --git a/7kaa-2.14.5_overflow.patch b/7kaa-2.14.5_overflow.patch new file mode 100644 index 0000000..fb82054 --- /dev/null +++ b/7kaa-2.14.5_overflow.patch @@ -0,0 +1,30 @@ +diff -ur 7kaa-2.14.5/src/client/OGAMEMP.cpp 7kaa-2.14.5_fix/src/client/OGAMEMP.cpp +--- 7kaa-2.14.5/src/client/OGAMEMP.cpp 2015-05-19 03:00:20.000000000 +0200 ++++ 7kaa-2.14.5_fix/src/client/OGAMEMP.cpp 2015-09-29 17:05:01.007513932 +0200 +@@ -4966,7 +4966,7 @@ + String str; + + snprintf(str, +- 255, ++ MAX_STR_LEN+1, + ngettext("This multiplayer saved game needs %d human players while now there is only %d human player.", + "This multiplayer saved game needs %d human players while now there are only %d human players.", + regPlayerCount), +@@ -5123,7 +5123,7 @@ + String str; + + snprintf(str, +- 255, ++ MAX_STR_LEN+1, + ngettext("This multiplayer saved game needs %d human players while now there is only %d human player.", + "This multiplayer saved game needs %d human players while now there are only %d human players.", + playerCount), +@@ -5141,7 +5141,7 @@ + { + String str; + +- snprintf(str, 255, _("This multiplayer saved game can only support %d human players while now there are %d human players. The game cannot start."), maxPlayer, playerCount); ++ snprintf(str, MAX_STR_LEN+1, _("This multiplayer saved game can only support %d human players while now there are %d human players. The game cannot start."), maxPlayer, playerCount); + + box.msg(str); + return 0; diff --git a/7kaa.changes b/7kaa.changes index 7b35034..3d48072 100644 --- a/7kaa.changes +++ b/7kaa.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Sep 29 15:06:37 UTC 2015 - opensuse@dstoecker.de + +- patch buffer overflow + ------------------------------------------------------------------- Fri Sep 25 18:32:04 UTC 2015 - nemysis@openSUSE.org diff --git a/7kaa.spec b/7kaa.spec index 469b151..1c62d56 100644 --- a/7kaa.spec +++ b/7kaa.spec @@ -28,6 +28,8 @@ Url: http://7kfans.com/ Source0: http://sourceforge.net/projects/skfans/files/7KAA%20%{version}/%{name}-%{version}.tar.bz2 # PATCH-FIX-OPENSUSE - 7kaa-2.14.5.patch -- https://github.com/the3dfxdude/7kaa/issues/48 Patch0: %{name}-2.14.5.patch +# PATCH-FIX-UPSTREAM - patch buffer overflow due to wrong size assumptions +Patch0: %{name}-2.14.5_overflow.patch Source1: %{name}.png Source2: %{name}.desktop %if 0%{?suse_version} @@ -61,6 +63,7 @@ the GPL v2. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build export CXXFLAGS="%{optflags} -fno-strict-aliasing"