diff options
author | Holger Freyther <zecke@selfish.org> | 2005-03-02 23:15:11 +0000 |
---|---|---|
committer | Holger Freyther <zecke@selfish.org> | 2005-03-02 23:15:11 +0000 |
commit | 5fd03690db13a4872514379b460503de0d8e2aca (patch) | |
tree | 0061f60a9e51369d35505eb879bab249ced34390 /packages/libsdl/libsdl-qpe-1.2.7/pygame.patch | |
parent | fca7b071b9ab268d3b9bfa505b3a9dbd88c4a845 (diff) |
libsdl-qpe:
Update the pygame.patch. Copy sz+1 characters (including '\0' ) from buf
to cmdline[i] and use memcpy instead of strncpy
BKrev: 422648ff2n0Z7sNiL4A_fQUBSVAYFA
Diffstat (limited to 'packages/libsdl/libsdl-qpe-1.2.7/pygame.patch')
-rw-r--r-- | packages/libsdl/libsdl-qpe-1.2.7/pygame.patch | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/packages/libsdl/libsdl-qpe-1.2.7/pygame.patch b/packages/libsdl/libsdl-qpe-1.2.7/pygame.patch index f87b40d8a9..276902c608 100644 --- a/packages/libsdl/libsdl-qpe-1.2.7/pygame.patch +++ b/packages/libsdl/libsdl-qpe-1.2.7/pygame.patch @@ -53,8 +53,8 @@ Index: SDL-1.2.7/src/main/qtopia/SDL_qtopia_main.cc 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> @@ -114,10 +114,12 @@ Index: SDL-1.2.7/src/video/qtopia/SDL_qmain.cc + */ + 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 */ @@ -157,7 +159,7 @@ Index: SDL-1.2.7/src/video/qtopia/SDL_qmain.cc 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 @@ -173,7 +175,7 @@ Index: SDL-1.2.7/src/main/Makefile.am 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 \ |