File rboxlib-bufferoverflowstrncat.patch of Package python-scipy

--- scipy.orig/scipy/spatial/qhull/src/rboxlib.c	2010-11-20 10:17:52.000000000 -0500
+++ scipy/scipy/spatial/qhull/src/rboxlib.c	2010-11-20 19:04:37.004649278 -0500
@@ -124,7 +124,7 @@
   }
 
   *command= '\0';
-  strncat(command, rbox_command, sizeof(command));
+  strncat(command, rbox_command, sizeof(command)-strlen(command)-1);
 
   while (*s && !isspace(*s))  /* skip program name */
     s++;
@@ -347,7 +347,7 @@
   }else if (israndom) {
     seed= (int)time(&timedata);
     sprintf(seedbuf, " t%d", seed);  /* appends an extra t, not worth removing */
-    strncat(command, seedbuf, sizeof(command));
+    strncat(command, seedbuf, sizeof(command)-strlen(command)-1);
     t= strstr(command, " t ");
     if (t)
       strcpy(t+1, t+3); /* remove " t " */
openSUSE Build Service is sponsored by