From 375abbce4251fdfb7f14411b2e4044c71ce4c9e8 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Dec 28 2005 12:07:01 +0000 Subject: don't crash on maliciously formed callsign, etc. strings (#176626, patch backported from upstream CVS) --- diff --git a/bzflag-2.0.2-isoc++.patch b/bzflag-2.0.2-isoc++.patch deleted file mode 100644 index eed2279..0000000 --- a/bzflag-2.0.2-isoc++.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- bzflag-2.0.2.20050318/src/ogl/OpenGLGState.cxx.isoc++ 2005-01-18 06:18:32.000000000 +0100 -+++ bzflag-2.0.2.20050318/src/ogl/OpenGLGState.cxx 2005-11-17 15:09:26.000000000 +0100 -@@ -34,6 +34,8 @@ - int __beginendCount; - #endif - -+// appease ISO C++ -+class SortedGState; - - // - // OpenGLGStateState diff --git a/bzflag-2.0.4-stringdos.patch b/bzflag-2.0.4-stringdos.patch new file mode 100644 index 0000000..fdd9b76 --- /dev/null +++ b/bzflag-2.0.4-stringdos.patch @@ -0,0 +1,15 @@ +--- bzflag-2.0.4.20050930/src/game/PlayerInfo.cxx.stringdos 2005-09-28 02:24:42.000000000 +0200 ++++ bzflag-2.0.4.20050930/src/game/PlayerInfo.cxx 2005-12-28 12:39:57.000000000 +0100 +@@ -108,6 +108,12 @@ + buf = nboUnpackString(buf, email, EmailLen); + buf = nboUnpackString(buf, token, TokenLen); + buf = nboUnpackString(buf, clientVersion, VersionLen); ++ ++ // terminate the strings ++ callSign[CallSignLen - 1] = '\0'; ++ email[EmailLen - 1] = '\0'; ++ token[TokenLen - 1] = '\0'; ++ clientVersion[VersionLen - 1] = '\0'; + cleanEMail(); + + DEBUG2("Player %s [%d] sent version string: %s\n", diff --git a/bzflag.spec b/bzflag.spec index 75c835d..a9029b4 100644 --- a/bzflag.spec +++ b/bzflag.spec @@ -7,14 +7,14 @@ Summary: 3D multi-player tank battle game Name: bzflag Version: 2.0.4 -Release: 1 +Release: 2 License: GPL Group: Amusements/Games URL: http://bzflag.org Source0: http://ftp.bzflag.org/bzflag/bzflag-%{version}%{?date:.%{date}}.tar.bz2 Source1: bzflag.desktop Patch0: bzflag-2.0.4-lookup.patch -Patch1: bzflag-2.0.2-isoc++.patch +Patch1: bzflag-2.0.4-stringdos.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) %if %_modular_X BuildRequires: libXi-devel @@ -48,7 +48,8 @@ There are two main styles of play: capture-the-flag and free-for-all. %prep %setup -q -n %{name}-%{version}%{?date:.%{date}} -%patch0 -p1 -b .isoc++ +%patch0 -p1 -b .lookup +%patch1 -p1 -b .stringdos %build # Use PIE because bzflag/bzfs are networked server applications @@ -93,6 +94,10 @@ rm -rf %{buildroot} %{_mandir}/man*/* %changelog +* Wed Dec 28 2005 Nils Philippsen 2.0.4-2 +- don't crash on maliciously formed callsign, etc. strings (#176626, patch + backported from upstream CVS) + * Mon Nov 21 2005 Nils Philippsen 2.0.4-1 - version 2.0.4 - update lookup patch