[PHP-DEV] CVS update: php3/functions From: rasmus (php-dev <email protected>)
Date: 05/30/98

Date: Saturday May 30, 1998 @ 10:14
Author: rasmus

Update of /repository/php3/functions
In directory asf:/tmp/cvs-serv4381/functions

Modified Files:
        exec.c oracle.c
Log Message:
Fix strncat in oracle.c

Index: php3/functions/exec.c
diff -c php3/functions/exec.c:1.71 php3/functions/exec.c:1.72
*** php3/functions/exec.c:1.71 Sat May 30 09:49:12 1998
--- php3/functions/exec.c Sat May 30 10:14:03 1998
***************
*** 26,32 ****
     | Author: Rasmus Lerdorf |
     +----------------------------------------------------------------------+
   */
! /* $Id: exec.c,v 1.71 1998/05/30 13:49:12 rasmus Exp $ */
  
  #ifdef THREAD_SAFE
  #include "tls.h"
--- 26,32 ----
     | Author: Rasmus Lerdorf |
     +----------------------------------------------------------------------+
   */
! /* $Id: exec.c,v 1.72 1998/05/30 14:14:03 rasmus Exp $ */
  
  #ifdef THREAD_SAFE
  #include "tls.h"
***************
*** 60,68 ****
          char *b, *c, *d=NULL;
          TLS_VARS;
  
! if (php3_ini.safe_mode) {
                  lcmd = strlen(cmd);
! ldir = strlen(php3_ini.safe_mode_exec_dir);
                  l = lcmd + ldir + 3;
                  overflow_limit = l;
                  c = strchr(cmd, ' ');
--- 60,68 ----
          char *b, *c, *d=NULL;
          TLS_VARS;
  
! if (GLOBAL(php3_ini).safe_mode) {
                  lcmd = strlen(cmd);
! ldir = strlen(GLOBAL(php3_ini).safe_mode_exec_dir);
                  l = lcmd + ldir + 3;
                  overflow_limit = l;
                  c = strchr(cmd, ' ');
***************
*** 73,79 ****
                  }
                  b = strrchr(cmd, '/');
                  d = emalloc(l);
! strncpy(d, php3_ini.safe_mode_exec_dir, l - 1);
                  overflow_limit -= ldir;
                  if (b) {
                          strncat(d, b, overflow_limit);
--- 73,79 ----
                  }
                  b = strrchr(cmd, '/');
                  d = emalloc(l);
! strncpy(d, GLOBAL(php3_ini).safe_mode_exec_dir, l - 1);
                  overflow_limit -= ldir;
                  if (b) {
                          strncat(d, b, overflow_limit);
Index: php3/functions/oracle.c
diff -c php3/functions/oracle.c:1.66 php3/functions/oracle.c:1.67
*** php3/functions/oracle.c:1.66 Thu May 21 19:57:33 1998
--- php3/functions/oracle.c Sat May 30 10:14:03 1998
***************
*** 1344,1351 ****
                  l--;
          }
          if (cda->fc > 0) {
! strncat(errmsg, " -- while processing OCI function ", 100);
! strcat(errmsg, ora_func_tab[cda->fc]);
          }
          return (char *) errmsg;
  }
--- 1344,1351 ----
                  l--;
          }
          if (cda->fc > 0) {
! strcat(errmsg, " -- while processing OCI function ");
! strncat(errmsg, ora_func_tab[cda->fc], 75); /* 512 - 400 - 36 */
          }
          return (char *) errmsg;
  }