summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--quake3-strcpy-abuse.patch31
-rw-r--r--quake3.spec4
2 files changed, 34 insertions, 1 deletions
diff --git a/quake3-strcpy-abuse.patch b/quake3-strcpy-abuse.patch
new file mode 100644
index 0000000..b98a99b
--- /dev/null
+++ b/quake3-strcpy-abuse.patch
@@ -0,0 +1,31 @@
+--- quake3-1.36/code/botlib/l_precomp.c~ 2009-04-27 08:42:37.000000000 +0200
++++ quake3-1.36/code/botlib/l_precomp.c~ 2009-11-03 21:03:08.000000000 +0100
+@@ -948,7 +948,7 @@ void PC_ConvertPath(char *path)
+ if ((*ptr == '\\' || *ptr == '/') &&
+ (*(ptr+1) == '\\' || *(ptr+1) == '/'))
+ {
+- strcpy(ptr, ptr+1);
++ memmove(ptr, ptr+1, strlen(ptr));
+ } //end if
+ else
+ {
+--- quake3-1.36/code/botlib/l_script.c~ 2009-04-27 08:42:37.000000000 +0200
++++ quake3-1.36/code/botlib/l_script.c~ 2009-11-03 21:06:11.000000000 +0100
+@@ -1118,7 +1118,7 @@ void StripDoubleQuotes(char *string)
+ {
+ if (*string == '\"')
+ {
+- strcpy(string, string+1);
++ memmove(string, string+1, strlen(string));
+ } //end if
+ if (string[strlen(string)-1] == '\"')
+ {
+@@ -1135,7 +1135,7 @@ void StripSingleQuotes(char *string)
+ {
+ if (*string == '\'')
+ {
+- strcpy(string, string+1);
++ memmove(string, string+1, strlen(string));
+ } //end if
+ if (string[strlen(string)-1] == '\'')
+ {
diff --git a/quake3.spec b/quake3.spec
index adbf251..aa3fbf8 100644
--- a/quake3.spec
+++ b/quake3.spec
@@ -1,7 +1,7 @@
%define dataver 1.32b3-1
%define snap 20090430
-%define rel 2
+%define rel 3
Summary: Quake3 for Linux
Summary(de.UTF-8): Quake3 für Linux
Summary(pl.UTF-8): Quake3 dla Linuksa
@@ -19,6 +19,7 @@ Source4: %{name}.desktop
Source5: %{name}-smp.desktop
Patch0: %{name}-QUAKELIBDIR.patch
Patch1: %{name}-alpha.patch
+Patch2: %{name}-strcpy-abuse.patch
URL: http://ioquake3.org/
BuildRequires: OpenAL-devel
BuildRequires: OpenGL-GLU-devel
@@ -123,6 +124,7 @@ Pliki wspólne Quake3 dla serwera i trybu gracza.
%setup -q -n %{name}
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%build
cat << 'EOF' > Makefile.local