[duel3] Work around for a buffer overflow issue.
Bruno Wolff III
bruno at fedoraproject.org
Sat Mar 3 08:58:03 UTC 2012
commit 26981583144db1db94ef98963f3ee05488b465ae
Author: Bruno Wolff III <bruno at wolff.to>
Date: Sat Mar 3 02:44:50 2012 -0600
Work around for a buffer overflow issue.
While the patch probably makes sense on its own from a safety
perspective, it doesn't fix the underlying initialization issue
that is resulting in bad data.
Duel3_20060225-extra-fix-buf-oflow.patch | 13 +++++++++++++
duel3.spec | 7 ++++++-
2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/Duel3_20060225-extra-fix-buf-oflow.patch b/Duel3_20060225-extra-fix-buf-oflow.patch
new file mode 100644
index 0000000..a4a3350
--- /dev/null
+++ b/Duel3_20060225-extra-fix-buf-oflow.patch
@@ -0,0 +1,13 @@
+--- Duel3_20060225_src/Source/Player.cpp 2011-10-31 16:04:27.822637813 +0000
++++ Duel3_20060225_src/Source/Player.cpp 2011-10-31 16:06:37.410633539 +0000
+@@ -32,8 +32,8 @@
+ else
+ sprintf(ammo_left,"",ship.retWepName());
+
+- sprintf(shield_percent,"%d%%",(int)ship.retSheildHealth());
+- sprintf(armour_percent,"%d%%",(int)ship.retArmorHealth());
++ snprintf(shield_percent,5,"%d%%",(int)ship.retSheildHealth());
++ snprintf(armour_percent,5,"%d%%",(int)ship.retArmorHealth());
+
+ if(lives>0)
+ sprintf(lives_left,"%d",lives);
diff --git a/duel3.spec b/duel3.spec
index 231be7a..d28cb04 100644
--- a/duel3.spec
+++ b/duel3.spec
@@ -1,7 +1,7 @@
%define snapshot 20060225
Name: duel3
Version: 0.1
-Release: 0.11.%{snapshot}%{?dist}
+Release: 0.12.%{snapshot}%{?dist}
Summary: One on one spaceship duel in a 2D arena
Group: Amusements/Games
License: BSD
@@ -14,6 +14,7 @@ Source4: music-credits.txt
Patch0: Duel3_20060225-fixes.patch
Patch1: Duel3_20060225-windowed-mode.patch
Patch2: Duel3_20060225-fix-buf-oflow.patch
+Patch3: Duel3_20060225-extra-fix-buf-oflow.patch
BuildRequires: alleggl-devel dumb-devel libGLU-devel desktop-file-utils
Requires: hicolor-icon-theme opengl-games-utils
@@ -45,6 +46,7 @@ cp %{SOURCE4} .
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
sed -i 's/\r//' Source/readme.txt license.txt music-credits.txt
@@ -94,6 +96,9 @@ fi
%changelog
+* Sat Mar 03 2012 Bruno Wolff III <bruno at wolff.to> - 0.1-0.12.20060225
+- Short term work around for buffer overflow issue
+
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.1-0.11.20060225
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list