rpms/nogravity/devel nogravity--strcpy-abuse.patch, NONE, 1.1 nogravity--bufer-overflows.patch, 1.1, 1.2 nogravity.spec, 1.5, 1.6

Hans de Goede jwrdegoede at fedoraproject.org
Sat Nov 7 12:59:49 UTC 2009


Author: jwrdegoede

Update of /cvs/extras/rpms/nogravity/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv712

Modified Files:
	nogravity--bufer-overflows.patch nogravity.spec 
Added Files:
	nogravity--strcpy-abuse.patch 
Log Message:
* Sat Nov  7 2009 Hans de Goede <hdegoede at redhat.com> 2.00-10
- Fix crash on startup on Intel 64 bit CPU's (strcpy abuse)


nogravity--strcpy-abuse.patch:
 sysini.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE nogravity--strcpy-abuse.patch ---
--- nogravity-2.00/rlx32/src/sysini.c	2005-02-26 00:15:40.000000000 +0100
+++ nogravity-2.00.new/rlx32/src/sysini.c	2009-11-07 13:16:39.000000000 +0100
@@ -174,7 +174,7 @@
 {
     char    *orgStr = str;
     while( isspace(*str) ) str++;
-    sysStrCpy(orgStr, str);
+    memmove(orgStr, str, strlen(str) + 1);
 }
 /*------------------------------------------------------------------------
 *

nogravity--bufer-overflows.patch:
 rlx32/include/systools.h  |    3 ++-
 rlx32/src/linux/systime.c |    1 +
 rlx32/src/sysgi.c         |    4 ++++
 rlx32/src/sysresmx.c      |    8 ++++----
 rlx32/src/systools.c      |    7 +++++++
 rlx32/src/v3xmaps.c       |    2 +-
 rlx32/src/v3xscen2.c      |    4 ++--
 src/console.c             |    6 +++---
 src/lt_cmx.h              |    4 ++--
 src/lt_info.c             |    6 +++---
 src/lt_input.c            |    1 +
 src/lt_struc.h            |    2 +-
 12 files changed, 31 insertions(+), 17 deletions(-)

Index: nogravity--bufer-overflows.patch
===================================================================
RCS file: /cvs/extras/rpms/nogravity/devel/nogravity--bufer-overflows.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- nogravity--bufer-overflows.patch	30 Jan 2008 10:05:18 -0000	1.1
+++ nogravity--bufer-overflows.patch	7 Nov 2009 12:59:42 -0000	1.2
@@ -164,3 +164,43 @@
  #include "_rlx32.h"
  #include "sysctrl.h"
  #include "systools.h"
+--- nogravity-2.00/src/console.c	2009-11-07 12:13:25.000000000 +0100
++++ nogravity-2.00.new/src/console.c	2009-11-07 11:58:20.000000000 +0100
+@@ -114,7 +114,7 @@
+ 	p = (struct sys_console_item*) malloc (sizeof(struct sys_console_item));
+ 	p->prev = 0;
+ 	p->next = 0;
+-	sysStrnCpy(p->text, msg, MAX_SYS_CONSOLE_TEXT);
++	sysStrnCpy(p->text, msg, MAX_SYS_CONSOLE_TEXT-1);
+ 
+ 	if (!m_pFirst)
+ 		m_pFirst = m_pLast = p;
+@@ -321,7 +321,7 @@
+ {
+ 	struct sys_console_cmd *p = (struct sys_console_cmd*) malloc(sizeof(struct sys_console_cmd ));
+ 	p->next = 0;
+-	sysStrnCpy(p->szCmd, szCmd, MAX_SYS_CONSOLE_TEXT);
++	sysStrnCpy(p->szCmd, szCmd, MAX_SYS_CONSOLE_TEXT-1);
+ 	p->pfFunc = pfFunc;
+ 
+ 	if (!m_pFirstCmd)
+@@ -340,7 +340,7 @@
+ {
+ 	struct sys_console_cvar *p = (struct sys_console_cvar*) malloc(sizeof(struct sys_console_cvar));
+ 	p->next = 0;
+-	sysStrnCpy(p->szVar, szVar, MAX_SYS_CONSOLE_TEXT);
++	sysStrnCpy(p->szVar, szVar, MAX_SYS_CONSOLE_TEXT-1);
+ 	p->pData = (void*)pData;
+ 
+ 	if (!m_pFirstCvar)
+--- nogravity-2.00/src/lt_struc.h	2005-02-24 20:16:48.000000000 +0100
++++ nogravity-2.00.new/src/lt_struc.h	2009-11-07 12:06:13.000000000 +0100
+@@ -501,7 +501,7 @@
+ 
+ typedef struct {
+ 	u_int16_t track, mode;
+-	char filename[16];
++	char filename[17];
+ }SGMusic;
+ 
+ enum Ms_Enum


Index: nogravity.spec
===================================================================
RCS file: /cvs/extras/rpms/nogravity/devel/nogravity.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- nogravity.spec	16 Aug 2009 12:41:36 -0000	1.5
+++ nogravity.spec	7 Nov 2009 12:59:43 -0000	1.6
@@ -1,6 +1,6 @@
 Name:           nogravity
 Version:        2.00
-Release:        9%{?dist}
+Release:        10%{?dist}
 Summary:        Space shooter in 3D
 Group:          Amusements/Games
 License:        GPLv2+
@@ -21,6 +21,7 @@ Patch5:         nogravity--openal.patch
 # See: https://www.redhat.com/archives/fedora-games-list/2007-June/msg00000.html
 Patch6:         nogravity--README.patch
 Patch7:         nogravity--bufer-overflows.patch
+Patch8:         nogravity--strcpy-abuse.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires:       %{name}-data = %{version}
 BuildRequires:  SDL_mixer-devel openal-soft-devel libpng-devel libvorbis-devel
@@ -47,6 +48,7 @@ cp %{SOURCE6} ./src/Linux/configure.in
 %patch5 -p1 -b .openal
 %patch6 -p1 -b .license
 %patch7 -p1 -b .buf-oflow
+%patch8 -p1 -b .strcpy
 sed -i 's/\r//g' GNU.TXT README.TXT
 pushd src/Linux
 sh bootstrap
@@ -110,6 +112,9 @@ fi
 
 
 %changelog
+* Sat Nov  7 2009 Hans de Goede <hdegoede at redhat.com> 2.00-10
+- Fix crash on startup on Intel 64 bit CPU's (strcpy abuse)
+
 * Sun Aug 16 2009 Hans de Goede <hdegoede at redhat.com> 2.00-9
 - Switch to openal-soft
 




More information about the scm-commits mailing list