iliaa           Tue Feb 10 16:14:18 2009 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/main/streams       plain_wrapper.c 
    /php-src/main       fopen_wrappers.c 
  Log:
  Adjust condition
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/streams/plain_wrapper.c?r1=1.52.2.6.2.23.2.12&r2=1.52.2.6.2.23.2.13&diff_format=u
Index: php-src/main/streams/plain_wrapper.c
diff -u php-src/main/streams/plain_wrapper.c:1.52.2.6.2.23.2.12 
php-src/main/streams/plain_wrapper.c:1.52.2.6.2.23.2.13
--- php-src/main/streams/plain_wrapper.c:1.52.2.6.2.23.2.12     Tue Feb 10 
14:21:27 2009
+++ php-src/main/streams/plain_wrapper.c        Tue Feb 10 16:14:18 2009
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: plain_wrapper.c,v 1.52.2.6.2.23.2.12 2009/02/10 14:21:27 iliaa Exp $ */
+/* $Id: plain_wrapper.c,v 1.52.2.6.2.23.2.13 2009/02/10 16:14:18 iliaa Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -1328,7 +1328,7 @@
                /* getcwd() will return always return [DRIVE_LETTER]:/) on 
windows. */
                *(cwd+3) = '\0';
        
-               if (snprintf(trypath, MAXPATHLEN, "%s%s", cwd, filename) > 
MAXPATHLEN) {
+               if (snprintf(trypath, MAXPATHLEN, "%s%s", cwd, filename) >= 
MAXPATHLEN) {
                        php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s/%s path 
was truncated to %d", cwd, filename, MAXPATHLEN);
                }
                
@@ -1391,7 +1391,7 @@
                if (*ptr == '\0') {
                        goto stream_skip;
                }
-               if (snprintf(trypath, MAXPATHLEN, "%s/%s", ptr, filename) > 
MAXPATHLEN) {
+               if (snprintf(trypath, MAXPATHLEN, "%s/%s", ptr, filename) >= 
MAXPATHLEN) {
                        php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s/%s path 
was truncated to %d", ptr, filename, MAXPATHLEN);
                }
 
http://cvs.php.net/viewvc.cgi/php-src/main/fopen_wrappers.c?r1=1.175.2.3.2.13.2.16&r2=1.175.2.3.2.13.2.17&diff_format=u
Index: php-src/main/fopen_wrappers.c
diff -u php-src/main/fopen_wrappers.c:1.175.2.3.2.13.2.16 
php-src/main/fopen_wrappers.c:1.175.2.3.2.13.2.17
--- php-src/main/fopen_wrappers.c:1.175.2.3.2.13.2.16   Tue Feb 10 14:18:46 2009
+++ php-src/main/fopen_wrappers.c       Tue Feb 10 16:14:18 2009
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: fopen_wrappers.c,v 1.175.2.3.2.13.2.16 2009/02/10 14:18:46 iliaa Exp $ 
*/
+/* $Id: fopen_wrappers.c,v 1.175.2.3.2.13.2.17 2009/02/10 16:14:18 iliaa Exp $ 
*/
 
 /* {{{ includes
  */
@@ -706,7 +706,7 @@
                        *end = '\0';
                        end++;
                }
-               if (snprintf(trypath, MAXPATHLEN, "%s/%s", ptr, filename) > 
MAXPATHLEN) {
+               if (snprintf(trypath, MAXPATHLEN, "%s/%s", ptr, filename) >= 
MAXPATHLEN) {
                        php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s/%s path 
was truncated to %d", ptr, filename, MAXPATHLEN);
                }
                if (PG(safe_mode)) {



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

Reply via email to