SHA256
1
0
forked from pool/7kaa
Dirk Stoecker 2015-09-29 15:06:45 +00:00 committed by Git OBS Bridge
parent d0650c8ae4
commit 23bb223f8d
3 changed files with 38 additions and 0 deletions

View File

@ -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;

View File

@ -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

View File

@ -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"