[ultimatestunts/f15/master] fix crash in replay (#652855)
Dan Horák
sharkcz at fedoraproject.org
Sat Apr 16 14:33:46 UTC 2011
commit e33a7c913af9094d00dfe64e6f17d68acdb93797
Author: Dan Horák <dan at danny.cz>
Date: Sat Apr 16 16:33:51 2011 +0200
fix crash in replay (#652855)
ultimatestunts-0751-replay.patch | 13 +++++++++++++
ultimatestunts.spec | 7 ++++++-
2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/ultimatestunts-0751-replay.patch b/ultimatestunts-0751-replay.patch
new file mode 100644
index 0000000..4bc113f
--- /dev/null
+++ b/ultimatestunts-0751-replay.patch
@@ -0,0 +1,13 @@
+diff -up ultimatestunts-srcdata-0751/simulation/replayer.cpp.orig ultimatestunts-srcdata-0751/simulation/replayer.cpp
+--- ultimatestunts-srcdata-0751/simulation/replayer.cpp.orig 2011-04-16 14:55:32.000000000 +0200
++++ ultimatestunts-srcdata-0751/simulation/replayer.cpp 2011-04-16 14:56:58.000000000 +0200
+@@ -203,6 +203,9 @@ bool CReplayer::readData()
+ {
+ unsigned int pos = 0;
+ CBinBuffer header = readBytes(2); //16 bits
++ if(header.size() < 2) //reached end of file
++ return false;
++
+ unsigned int dataSize = header.getUint16(pos);
+
+ CBinBuffer data = readBytes(dataSize);
diff --git a/ultimatestunts.spec b/ultimatestunts.spec
index 4bfdbb0..70c3bd5 100644
--- a/ultimatestunts.spec
+++ b/ultimatestunts.spec
@@ -2,7 +2,7 @@
Name: ultimatestunts
Version: 0.7.5
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: Remake of the famous DOS-game Stunts
Group: Amusements/Games
@@ -12,6 +12,7 @@ Source0: http://downloads.sf.net/%{name}/%{name}-srcdata-%{ver}.tar.gz
Source1: %{name}.desktop
Patch0: ultimatestunts-0721-make.patch
Patch1: ultimatestunts-0751-locale.patch
+Patch2: ultimatestunts-0751-replay.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: dos2unix freealut-devel SDL_image-devel freeglut-devel libXi-devel
@@ -33,6 +34,7 @@ graphics, 3D sound and internet multiplaying.
%setup -q -n %{name}-srcdata-%{ver}
%patch0
%patch1
+%patch2 -p1
# remove CVS control files
find . -name CVS -type d -print0 | xargs -0 rm -rf
@@ -101,6 +103,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Sat Apr 16 2011 Dan Horák <dan[at]danny.cz> 0.7.5-7
+- fix crash in replay (#652855)
+
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.7.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
More information about the scm-commits
mailing list