libsdl-qpe:
authorHolger Freyther <zecke@selfish.org>
Wed, 2 Mar 2005 23:15:11 +0000 (23:15 +0000)
committerHolger Freyther <zecke@selfish.org>
Wed, 2 Mar 2005 23:15:11 +0000 (23:15 +0000)
Update the pygame.patch. Copy sz+1 characters (including '\0' ) from buf
to cmdline[i] and use memcpy instead of strncpy

BKrev: 422648ff2n0Z7sNiL4A_fQUBSVAYFA

packages/libsdl/libsdl-qpe-1.2.7/pygame.patch

index f87b40d..276902c 100644 (file)
@@ -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           \