iliaa           Tue Feb 27 03:28:17 2007 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/ftp    ftp.c 
    /php-src/ext/hash   hash.c 
    /php-src/ext/mbstring/oniguruma     regerror.c 
    /php-src/ext/mhash  mhash.c 
    /php-src/ext/pcre/pcrelib   pcregrep.c 
    /php-src/ext/pdo_firebird   firebird_driver.c 
    /php-src/ext/session        mod_mm.c session.c 
    /php-src/ext/spl    spl_directory.c spl_iterators.c 
    /php-src/ext/standard       html.c http_fopen_wrapper.c string.c 
    /php-src/ext/wddx   wddx.c 
    /php-src/main       SAPI.c 
    /php-src/sapi/cgi   cgi_main.c fastcgi.c 
    /php-src/sapi/tux   php_tux.c 
  Log:
  
  snprintf() -> slprintf()
  
http://cvs.php.net/viewvc.cgi/php-src/ext/ftp/ftp.c?r1=1.112.2.4.2.6&r2=1.112.2.4.2.7&diff_format=u
Index: php-src/ext/ftp/ftp.c
diff -u php-src/ext/ftp/ftp.c:1.112.2.4.2.6 php-src/ext/ftp/ftp.c:1.112.2.4.2.7
--- php-src/ext/ftp/ftp.c:1.112.2.4.2.6 Sat Feb 24 02:45:24 2007
+++ php-src/ext/ftp/ftp.c       Tue Feb 27 03:28:16 2007
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: ftp.c,v 1.112.2.4.2.6 2007/02/24 02:45:24 stas Exp $ */
+/* $Id: ftp.c,v 1.112.2.4.2.7 2007/02/27 03:28:16 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1102,13 +1102,13 @@
                if (strlen(cmd) + strlen(args) + 4 > FTP_BUFSIZE) {
                        return 0;
                }
-               size = snprintf(ftp->outbuf, sizeof(ftp->outbuf), "%s %s\r\n", 
cmd, args);
+               size = slprintf(ftp->outbuf, sizeof(ftp->outbuf), "%s %s\r\n", 
cmd, args);
        } else {
                /* "cmd\r\n\0" */
                if (strlen(cmd) + 3 > FTP_BUFSIZE) {
                        return 0;
                }
-               size = snprintf(ftp->outbuf, sizeof(ftp->outbuf), "%s\r\n", 
cmd);
+               size = slprintf(ftp->outbuf, sizeof(ftp->outbuf), "%s\r\n", 
cmd);
        }
 
        data = ftp->outbuf;
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/hash.c?r1=1.18.2.5.2.6&r2=1.18.2.5.2.7&diff_format=u
Index: php-src/ext/hash/hash.c
diff -u php-src/ext/hash/hash.c:1.18.2.5.2.6 
php-src/ext/hash/hash.c:1.18.2.5.2.7
--- php-src/ext/hash/hash.c:1.18.2.5.2.6        Mon Jan  8 22:29:25 2007
+++ php-src/ext/hash/hash.c     Tue Feb 27 03:28:16 2007
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: hash.c,v 1.18.2.5.2.6 2007/01/08 22:29:25 nlopess Exp $ */
+/* $Id: hash.c,v 1.18.2.5.2.7 2007/02/27 03:28:16 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -588,7 +588,7 @@
        for(zend_hash_internal_pointer_reset_ex(&php_hash_hashtable, &pos);
                (type = zend_hash_get_current_key_ex(&php_hash_hashtable, &str, 
NULL, &idx, 0, &pos)) != HASH_KEY_NON_EXISTANT;
                zend_hash_move_forward_ex(&php_hash_hashtable, &pos)) {
-               s += snprintf(s, e - s, "%s ", str);
+               s += slprintf(s, e - s, "%s ", str);
        }
        *s = 0;
 
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/oniguruma/regerror.c?r1=1.3.4.4&r2=1.3.4.5&diff_format=u
Index: php-src/ext/mbstring/oniguruma/regerror.c
diff -u php-src/ext/mbstring/oniguruma/regerror.c:1.3.4.4 
php-src/ext/mbstring/oniguruma/regerror.c:1.3.4.5
--- php-src/ext/mbstring/oniguruma/regerror.c:1.3.4.4   Sat Feb 24 02:17:24 2007
+++ php-src/ext/mbstring/oniguruma/regerror.c   Tue Feb 27 03:28:16 2007
@@ -278,6 +278,9 @@
 
   va_init_list(args, fmt);
   n = vsnprintf((char* )buf, bufsize, (const char* )fmt, args);
+  if (n >= bufsize) {
+       return;
+  }
   va_end(args);
 
   need = (pat_end - pat) * 4 + 4;
http://cvs.php.net/viewvc.cgi/php-src/ext/mhash/mhash.c?r1=1.48.2.3.2.4&r2=1.48.2.3.2.5&diff_format=u
Index: php-src/ext/mhash/mhash.c
diff -u php-src/ext/mhash/mhash.c:1.48.2.3.2.4 
php-src/ext/mhash/mhash.c:1.48.2.3.2.5
--- php-src/ext/mhash/mhash.c:1.48.2.3.2.4      Sat Feb 24 02:17:24 2007
+++ php-src/ext/mhash/mhash.c   Tue Feb 27 03:28:16 2007
@@ -16,7 +16,7 @@
    |          Nikos Mavroyanopoulos <[EMAIL PROTECTED]> (HMAC, KEYGEN)       |
    +----------------------------------------------------------------------+
  */
-/* $Id: mhash.c,v 1.48.2.3.2.4 2007/02/24 02:17:24 helly Exp $ */
+/* $Id: mhash.c,v 1.48.2.3.2.5 2007/02/27 03:28:16 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -70,7 +70,7 @@
 
        for (i=0; i<n; i++) {
                if ((name = mhash_get_hash_name(i))) {
-                       l = snprintf(buf, 127, "MHASH_%s", name);
+                       l = slprintf(buf, 127, "MHASH_%s", name);
                        zend_register_long_constant(buf, l + 1, i, 
CONST_PERSISTENT, module_number TSRMLS_CC);
                        free(name);
                }
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/pcrelib/pcregrep.c?r1=1.8.2.1.2.5&r2=1.8.2.1.2.6&diff_format=u
Index: php-src/ext/pcre/pcrelib/pcregrep.c
diff -u php-src/ext/pcre/pcrelib/pcregrep.c:1.8.2.1.2.5 
php-src/ext/pcre/pcrelib/pcregrep.c:1.8.2.1.2.6
--- php-src/ext/pcre/pcrelib/pcregrep.c:1.8.2.1.2.5     Sat Feb 24 02:17:25 2007
+++ php-src/ext/pcre/pcrelib/pcregrep.c Tue Feb 27 03:28:16 2007
@@ -1188,7 +1188,7 @@
     while ((nextfile = readdirectory(dir)) != NULL)
       {
       int frc, blen;
-      blen = snprintf(buffer, sizeof(buffer), "%.512s%c%.128s", pathname, sep, 
nextfile);
+      blen = slprintf(buffer, sizeof(buffer), "%.512s%c%.128s", pathname, sep, 
nextfile);
 
       if (exclude_compiled != NULL &&
           pcre_exec(exclude_compiled, NULL, buffer, blen, 0, 0, NULL, 0) >= 0)
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_firebird/firebird_driver.c?r1=1.17.2.2.2.3&r2=1.17.2.2.2.4&diff_format=u
Index: php-src/ext/pdo_firebird/firebird_driver.c
diff -u php-src/ext/pdo_firebird/firebird_driver.c:1.17.2.2.2.3 
php-src/ext/pdo_firebird/firebird_driver.c:1.17.2.2.2.4
--- php-src/ext/pdo_firebird/firebird_driver.c:1.17.2.2.2.3     Thu Jan 18 
15:55:09 2007
+++ php-src/ext/pdo_firebird/firebird_driver.c  Tue Feb 27 03:28:16 2007
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: firebird_driver.c,v 1.17.2.2.2.3 2007/01/18 15:55:09 tony2001 Exp $ */
+/* $Id: firebird_driver.c,v 1.17.2.2.2.4 2007/02/27 03:28:16 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -619,7 +619,7 @@
                /* loop through all the provided arguments and set dpb fields 
accordingly */
                for (i = 0; i < sizeof(dpb_flags); ++i) {
                        if (dpb_values[i] && buf_len > 0) {
-                               dpb_len = snprintf(dpb, buf_len, "%c%c%s", 
dpb_flags[i], (unsigned char)strlen(dpb_values[i]),
+                               dpb_len = slprintf(dpb, buf_len, "%c%c%s", 
dpb_flags[i], (unsigned char)strlen(dpb_values[i]),
                                        dpb_values[i]);
                                dpb += dpb_len;
                                buf_len -= dpb_len;
http://cvs.php.net/viewvc.cgi/php-src/ext/session/mod_mm.c?r1=1.46.2.1.2.4&r2=1.46.2.1.2.5&diff_format=u
Index: php-src/ext/session/mod_mm.c
diff -u php-src/ext/session/mod_mm.c:1.46.2.1.2.4 
php-src/ext/session/mod_mm.c:1.46.2.1.2.5
--- php-src/ext/session/mod_mm.c:1.46.2.1.2.4   Mon Feb 26 17:47:21 2007
+++ php-src/ext/session/mod_mm.c        Tue Feb 27 03:28:16 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: mod_mm.c,v 1.46.2.1.2.4 2007/02/26 17:47:21 tony2001 Exp $ */
+/* $Id: mod_mm.c,v 1.46.2.1.2.5 2007/02/27 03:28:16 iliaa Exp $ */
 
 #include "php.h"
 
@@ -262,7 +262,7 @@
                return FAILURE;
        }
 
-       if (!(euid_len = snprintf(euid, sizeof(euid), "%d", geteuid()))) {
+       if (!(euid_len = slprintf(euid, sizeof(euid), "%d", geteuid()))) {
                return FAILURE;
        }
                
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.28&r2=1.417.2.8.2.29&diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.28 
php-src/ext/session/session.c:1.417.2.8.2.29
--- php-src/ext/session/session.c:1.417.2.8.2.28        Sat Feb 24 02:17:25 2007
+++ php-src/ext/session/session.c       Tue Feb 27 03:28:16 2007
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: session.c,v 1.417.2.8.2.28 2007/02/24 02:17:25 helly Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.29 2007/02/27 03:28:16 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -950,7 +950,7 @@
        
        php_gmtime_r(when, &tm);
        
-       n = snprintf(buf, sizeof(buf), "%s, %02d %s %d %02d:%02d:%02d GMT", /* 
SAFE */
+       n = slprintf(buf, sizeof(buf), "%s, %02d %s %d %02d:%02d:%02d GMT", /* 
SAFE */
                                week_days[tm.tm_wday], tm.tm_mday, 
                                month_names[tm.tm_mon], tm.tm_year + 1900, 
                                tm.tm_hour, tm.tm_min, 
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.27.2.15&r2=1.45.2.27.2.16&diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.45.2.27.2.15 
php-src/ext/spl/spl_directory.c:1.45.2.27.2.16
--- php-src/ext/spl/spl_directory.c:1.45.2.27.2.15      Tue Feb 20 13:08:01 2007
+++ php-src/ext/spl/spl_directory.c     Tue Feb 27 03:28:16 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: spl_directory.c,v 1.45.2.27.2.15 2007/02/20 13:08:01 helly Exp $ */
+/* $Id: spl_directory.c,v 1.45.2.27.2.16 2007/02/27 03:28:16 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -1642,7 +1642,7 @@
                intern->file_name = "php://memory";
                intern->file_name_len = 12;
        } else if (ZEND_NUM_ARGS()) {
-               intern->file_name_len = snprintf(tmp_fname, sizeof(tmp_fname), 
"php://temp/maxmemory:%ld", max_memory);
+               intern->file_name_len = slprintf(tmp_fname, sizeof(tmp_fname), 
"php://temp/maxmemory:%ld", max_memory);
                intern->file_name = tmp_fname;
        } else {
                intern->file_name = "php://temp";
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_iterators.c?r1=1.73.2.30.2.24&r2=1.73.2.30.2.25&diff_format=u
Index: php-src/ext/spl/spl_iterators.c
diff -u php-src/ext/spl/spl_iterators.c:1.73.2.30.2.24 
php-src/ext/spl/spl_iterators.c:1.73.2.30.2.25
--- php-src/ext/spl/spl_iterators.c:1.73.2.30.2.24      Mon Feb 19 16:18:24 2007
+++ php-src/ext/spl/spl_iterators.c     Tue Feb 27 03:28:16 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: spl_iterators.c,v 1.73.2.30.2.24 2007/02/19 16:18:24 helly Exp $ */
+/* $Id: spl_iterators.c,v 1.73.2.30.2.25 2007/02/27 03:28:16 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -1390,7 +1390,7 @@
 
        if (intern->u.regex.flags & REGIT_USE_KEY) {
                if (intern->current.key_type == HASH_KEY_IS_LONG) {
-                       subject_len = snprintf(tmp, sizeof(tmp), "%ld", 
intern->current.int_key);
+                       subject_len = slprintf(tmp, sizeof(tmp), "%ld", 
intern->current.int_key);
                        subject = &tmp[0];
                        use_copy = 0;
                } else {
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/html.c?r1=1.111.2.2.2.8&r2=1.111.2.2.2.9&diff_format=u
Index: php-src/ext/standard/html.c
diff -u php-src/ext/standard/html.c:1.111.2.2.2.8 
php-src/ext/standard/html.c:1.111.2.2.2.9
--- php-src/ext/standard/html.c:1.111.2.2.2.8   Sat Feb 24 17:18:24 2007
+++ php-src/ext/standard/html.c Tue Feb 27 03:28:16 2007
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: html.c,v 1.111.2.2.2.8 2007/02/24 17:18:24 iliaa Exp $ */
+/* $Id: html.c,v 1.111.2.2.2.9 2007/02/27 03:28:16 iliaa Exp $ */
 
 /*
  * HTML entity resources:
@@ -912,7 +912,7 @@
                                if (entity_map[j].table[k - 
entity_map[j].basechar] == NULL)
                                        continue;
 
-                               entity_length = snprintf(entity, 
sizeof(entity), "&%s;", entity_map[j].table[k - entity_map[j].basechar]);
+                               entity_length = slprintf(entity, 
sizeof(entity), "&%s;", entity_map[j].table[k - entity_map[j].basechar]);
                                if (entity_length >= sizeof(entity)) {
                                        continue;
                                }
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/http_fopen_wrapper.c?r1=1.99.2.12.2.7&r2=1.99.2.12.2.8&diff_format=u
Index: php-src/ext/standard/http_fopen_wrapper.c
diff -u php-src/ext/standard/http_fopen_wrapper.c:1.99.2.12.2.7 
php-src/ext/standard/http_fopen_wrapper.c:1.99.2.12.2.8
--- php-src/ext/standard/http_fopen_wrapper.c:1.99.2.12.2.7     Fri Jan 19 
00:17:43 2007
+++ php-src/ext/standard/http_fopen_wrapper.c   Tue Feb 27 03:28:16 2007
@@ -19,7 +19,7 @@
    |          Sara Golemon <[EMAIL PROTECTED]>                              |
    +----------------------------------------------------------------------+
  */
-/* $Id: http_fopen_wrapper.c,v 1.99.2.12.2.7 2007/01/19 00:17:43 iliaa Exp $ 
*/ 
+/* $Id: http_fopen_wrapper.c,v 1.99.2.12.2.8 2007/02/27 03:28:16 iliaa Exp $ 
*/ 
 
 #include "php.h"
 #include "php_globals.h"
@@ -438,7 +438,7 @@
                /* ensure the header is only sent if user_agent is not blank */
                if (ua_len > sizeof(_UA_HEADER)) {
                        ua = emalloc(ua_len + 1);
-                       if ((ua_len = snprintf(ua, ua_len, _UA_HEADER, ua_str)) 
> 0) {
+                       if ((ua_len = slprintf(ua, ua_len, _UA_HEADER, ua_str)) 
> 0) {
                                ua[ua_len] = 0;
                                php_stream_write(stream, ua, ua_len);
                        } else {
@@ -456,7 +456,7 @@
                php_stream_context_get_option(context, "http", "content", 
&tmpzval) == SUCCESS &&
                Z_TYPE_PP(tmpzval) == IS_STRING && Z_STRLEN_PP(tmpzval) > 0) {
                if (!(have_header & HTTP_HEADER_CONTENT_LENGTH)) {
-                       scratch_len = snprintf(scratch, scratch_len, 
"Content-Length: %d\r\n", Z_STRLEN_PP(tmpzval));
+                       scratch_len = slprintf(scratch, scratch_len, 
"Content-Length: %d\r\n", Z_STRLEN_PP(tmpzval));
                        php_stream_write(stream, scratch, scratch_len);
                }
                if (!(have_header & HTTP_HEADER_TYPE)) {
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.43&r2=1.445.2.14.2.44&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.445.2.14.2.43 
php-src/ext/standard/string.c:1.445.2.14.2.44
--- php-src/ext/standard/string.c:1.445.2.14.2.43       Tue Feb 27 00:15:21 2007
+++ php-src/ext/standard/string.c       Tue Feb 27 03:28:16 2007
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: string.c,v 1.445.2.14.2.43 2007/02/27 00:15:21 iliaa Exp $ */
+/* $Id: string.c,v 1.445.2.14.2.44 2007/02/27 03:28:16 iliaa Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -905,7 +905,7 @@
 
                        case IS_LONG: {
                                char stmp[MAX_LENGTH_OF_LONG + 1];
-                               str_len = snprintf(stmp, sizeof(stmp), "%ld", 
Z_LVAL_PP(tmp));
+                               str_len = slprintf(stmp, sizeof(stmp), "%ld", 
Z_LVAL_PP(tmp));
                                smart_str_appendl(&implstr, stmp, str_len);
                        }
                                break;
http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/wddx.c?r1=1.119.2.10.2.12&r2=1.119.2.10.2.13&diff_format=u
Index: php-src/ext/wddx/wddx.c
diff -u php-src/ext/wddx/wddx.c:1.119.2.10.2.12 
php-src/ext/wddx/wddx.c:1.119.2.10.2.13
--- php-src/ext/wddx/wddx.c:1.119.2.10.2.12     Sat Feb 24 17:59:45 2007
+++ php-src/ext/wddx/wddx.c     Tue Feb 27 03:28:17 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: wddx.c,v 1.119.2.10.2.12 2007/02/24 17:59:45 iliaa Exp $ */
+/* $Id: wddx.c,v 1.119.2.10.2.13 2007/02/27 03:28:17 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -284,7 +284,7 @@
 
                        switch (hash_type) {
                                case HASH_KEY_IS_LONG:
-                                       key_length = snprintf(tmp, sizeof(tmp), 
"%ld", idx) + 1;
+                                       key_length = slprintf(tmp, sizeof(tmp), 
"%ld", idx) + 1;
                                        key = tmp;
                                        /* fallthru */
                                case HASH_KEY_IS_STRING:
@@ -501,7 +501,7 @@
                                zend_unmangle_property_name(key, key_len-1, 
&class_name, &prop_name);
                                php_wddx_serialize_var(packet, *ent, prop_name, 
strlen(prop_name)+1 TSRMLS_CC);
                        } else {
-                               key_len = snprintf(tmp_buf, sizeof(tmp_buf), 
"%ld", idx);
+                               key_len = slprintf(tmp_buf, sizeof(tmp_buf), 
"%ld", idx);
                                php_wddx_serialize_var(packet, *ent, tmp_buf, 
key_len TSRMLS_CC);
                        }
                }
@@ -572,7 +572,7 @@
                        if (ent_type == HASH_KEY_IS_STRING) {
                                php_wddx_serialize_var(packet, *ent, key, 
key_len TSRMLS_CC);
                        } else {
-                               key_len = snprintf(tmp_buf, sizeof(tmp_buf), 
"%ld", idx);
+                               key_len = slprintf(tmp_buf, sizeof(tmp_buf), 
"%ld", idx);
                                php_wddx_serialize_var(packet, *ent, tmp_buf, 
key_len TSRMLS_CC);
                        }
                } else
http://cvs.php.net/viewvc.cgi/php-src/main/SAPI.c?r1=1.202.2.7.2.8&r2=1.202.2.7.2.9&diff_format=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.202.2.7.2.8 php-src/main/SAPI.c:1.202.2.7.2.9
--- php-src/main/SAPI.c:1.202.2.7.2.8   Sat Feb 24 02:17:28 2007
+++ php-src/main/SAPI.c Tue Feb 27 03:28:17 2007
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: SAPI.c,v 1.202.2.7.2.8 2007/02/24 02:17:28 helly Exp $ */
+/* $Id: SAPI.c,v 1.202.2.7.2.9 2007/02/27 03:28:17 iliaa Exp $ */
 
 #include <ctype.h>
 #include <sys/stat.h>
@@ -687,7 +687,7 @@
                                                        /* If there is no realm 
string at all, append one */
                                                        
if(!strstr(lower_temp,"realm")) {
                                                                efree(result);
-                                                               conv_len = 
snprintf(conv_temp, sizeof(conv_temp), " realm=\"%ld\"",myuid);
+                                                               conv_len = 
slprintf(conv_temp, sizeof(conv_temp), " realm=\"%ld\"",myuid);
                                                                result = 
emalloc(ptr_len+conv_len+1);
                                                                result_len = 
ptr_len+conv_len;
                                                                memcpy(result, 
ptr, ptr_len);   
@@ -774,7 +774,7 @@
 
                        assert(Z_STRVAL_P(uf_result) != NULL);
 
-                       len = snprintf(buf, sizeof(buf), "Content-Encoding: 
%s", Z_STRVAL_P(uf_result));
+                       len = slprintf(buf, sizeof(buf), "Content-Encoding: 
%s", Z_STRVAL_P(uf_result));
                        if (len <= 0 || sapi_add_header(buf, len, 1) == 
FAILURE) {
                                return FAILURE;
                        }
@@ -818,7 +818,7 @@
                                        http_status_line.header_len = 
strlen(SG(sapi_headers).http_status_line);
                                } else {
                                        http_status_line.header = buf;
-                                       http_status_line.header_len = 
snprintf(buf, sizeof(buf), "HTTP/1.0 %d X", 
SG(sapi_headers).http_response_code);
+                                       http_status_line.header_len = 
slprintf(buf, sizeof(buf), "HTTP/1.0 %d X", 
SG(sapi_headers).http_response_code);
                                }
                                sapi_module.send_header(&http_status_line, 
SG(server_context) TSRMLS_CC);
                        }
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.28&r2=1.267.2.15.2.29&diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.28 
php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.29
--- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.28 Sat Feb 24 02:17:28 2007
+++ php-src/sapi/cgi/cgi_main.c Tue Feb 27 03:28:17 2007
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: cgi_main.c,v 1.267.2.15.2.28 2007/02/24 02:17:28 helly Exp $ */
+/* $Id: cgi_main.c,v 1.267.2.15.2.29 2007/02/27 03:28:17 iliaa Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -325,7 +325,7 @@
                int len;
 
                if (CGIG(rfc2616_headers) && SG(sapi_headers).http_status_line) 
{
-                       len = snprintf(buf, SAPI_CGI_MAX_HEADER_LENGTH,
+                       len = slprintf(buf, SAPI_CGI_MAX_HEADER_LENGTH,
                                                   "%s\r\n", 
SG(sapi_headers).http_status_line);
 
                        if (len > SAPI_CGI_MAX_HEADER_LENGTH) {
@@ -333,7 +333,7 @@
                        }
 
                } else {
-                       len = snprintf(buf, sizeof(buf), "Status: %d\r\n", 
SG(sapi_headers).http_response_code);
+                       len = slprintf(buf, sizeof(buf), "Status: %d\r\n", 
SG(sapi_headers).http_response_code);
                }
 
                PHPWRITE_H(buf, len);
@@ -444,13 +444,13 @@
 #endif
 #if !HAVE_SETENV
        if (value) {
-               len = snprintf(buf, len - 1, "%s=%s", name, value);
+               len = slprintf(buf, len - 1, "%s=%s", name, value);
                putenv(buf);
        }
 #endif
 #if !HAVE_UNSETENV
        if (!value) {
-               len = snprintf(buf, len - 1, "%s=", name);
+               len = slprintf(buf, len - 1, "%s=", name);
                putenv(buf);
        }
 #endif
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/fastcgi.c?r1=1.4.2.13.2.20&r2=1.4.2.13.2.21&diff_format=u
Index: php-src/sapi/cgi/fastcgi.c
diff -u php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.20 
php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.21
--- php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.20    Mon Feb 26 09:38:44 2007
+++ php-src/sapi/cgi/fastcgi.c  Tue Feb 27 03:28:17 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: fastcgi.c,v 1.4.2.13.2.20 2007/02/26 09:38:44 dmitry Exp $ */
+/* $Id: fastcgi.c,v 1.4.2.13.2.21 2007/02/27 03:28:17 iliaa Exp $ */
 
 #include "php.h"
 #include "fastcgi.h"
@@ -588,8 +588,8 @@
 
                for (j = 0; j < 
sizeof(fcgi_mgmt_vars)/sizeof(fcgi_mgmt_vars[0]); j++) {
                        if (zend_hash_exists(&req->env, fcgi_mgmt_vars[j].name, 
fcgi_mgmt_vars[j].name_len+1) == 0) {
-                sprintf((char*)p, "%c%c%s%c", fcgi_mgmt_vars[j].name_len, 1, 
fcgi_mgmt_vars[j].name, fcgi_mgmt_vars[j].val);
-                p += fcgi_mgmt_vars[j].name_len + 3;
+                               sprintf((char*)p, "%c%c%s%c", 
fcgi_mgmt_vars[j].name_len, 1, fcgi_mgmt_vars[j].name, fcgi_mgmt_vars[j].val);
+                               p += fcgi_mgmt_vars[j].name_len + 3;
                        }
                }
                len = p - buf - sizeof(fcgi_header);
http://cvs.php.net/viewvc.cgi/php-src/sapi/tux/php_tux.c?r1=1.26.2.1.2.2&r2=1.26.2.1.2.3&diff_format=u
Index: php-src/sapi/tux/php_tux.c
diff -u php-src/sapi/tux/php_tux.c:1.26.2.1.2.2 
php-src/sapi/tux/php_tux.c:1.26.2.1.2.3
--- php-src/sapi/tux/php_tux.c:1.26.2.1.2.2     Sat Feb 24 02:17:28 2007
+++ php-src/sapi/tux/php_tux.c  Tue Feb 27 03:28:17 2007
@@ -116,7 +116,7 @@
        status_line = malloc(30);
        
        /* safe sprintf use */
-       len = snprintf(status_line, 30, "HTTP/1.1 %d NA\r\n", 
SG(sapi_headers).http_response_code);
+       len = slprintf(status_line, 30, "HTTP/1.1 %d NA\r\n", 
SG(sapi_headers).http_response_code);
        
        vec[0].iov_base = status_line;
        vec[0].iov_len = len;
@@ -195,7 +195,7 @@
        sapi_header_line ctr = {0};
        
        ctr.line = buf;
-       ctr.line_len = snprintf(buf, sizeof(buf), "Server: %s", TUXAPI_version);
+       ctr.line_len = slprintf(buf, sizeof(buf), "Server: %s", TUXAPI_version);
        sapi_header_op(SAPI_HEADER_REPLACE, &ctr TSRMLS_CC);
        
        php_register_variable("PHP_SELF", SG(request_info).request_uri, 
track_vars_array TSRMLS_CC);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to