Index: SDL-1.2.7/src/video/qtopia/SDL_qmain.cc
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ SDL-1.2.7/src/video/qtopia/SDL_qmain.cc 2005-03-02 23:46:58.741836401 +0100
-@@ -0,0 +1,99 @@
++++ SDL-1.2.7/src/video/qtopia/SDL_qmain.cc 2005-03-03 00:11:13.830189869 +0100
+@@ -0,0 +1,101 @@
+/* Include the SDL main definition header */
+#include "SDL_main.h"
+#include <stdlib.h>
+ */
+ size_t sz = ::strlen(string_start);
+ cmdline[i] = new char[sz+1];
-+ strncpy( cmdline[i], string_start, sz );
++ memcpy( cmdline[i], string_start, sz+1 );
+ string_start += (sz+1); // +1 for '\0' +1 to set it beyond
+ }
+
++ ::close(fd);
++
+ return;
+
+/* error code */
Index: SDL-1.2.7/src/main/Makefile.am
===================================================================
--- SDL-1.2.7.orig/src/main/Makefile.am 2005-03-02 22:24:42.714596577 +0100
-+++ SDL-1.2.7/src/main/Makefile.am 2005-03-02 22:25:46.932524373 +0100
++++ SDL-1.2.7/src/main/Makefile.am 2005-03-03 00:08:55.914676851 +0100
@@ -21,11 +21,7 @@
if TARGET_MACOSX
MAINLIB_ARCH_SRCS = macosx/SDLMain.m macosx/SDLMain.h
Index: SDL-1.2.7/src/video/qtopia/Makefile.am
===================================================================
--- SDL-1.2.7.orig/src/video/qtopia/Makefile.am 2005-03-02 22:24:42.714596577 +0100
-+++ SDL-1.2.7/src/video/qtopia/Makefile.am 2005-03-02 22:25:46.932524373 +0100
++++ SDL-1.2.7/src/video/qtopia/Makefile.am 2005-03-03 00:08:55.915676710 +0100
@@ -15,4 +15,5 @@
SDL_syswm.cc \
SDL_syswm_c.h \