iliaa           Fri Jan 30 00:17:06 2009 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/standard       string.c 
  Log:
  
  MFB: Improved validation checks inside str_pad()
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.79&r2=1.445.2.14.2.80&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.445.2.14.2.79 
php-src/ext/standard/string.c:1.445.2.14.2.80
--- php-src/ext/standard/string.c:1.445.2.14.2.79       Wed Dec 31 11:17:45 2008
+++ php-src/ext/standard/string.c       Fri Jan 30 00:17:05 2009
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: string.c,v 1.445.2.14.2.79 2008/12/31 11:17:45 sebastian Exp $ */
+/* $Id: string.c,v 1.445.2.14.2.80 2009/01/30 00:17:05 iliaa Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -4922,7 +4922,7 @@
 
        /* If resulting string turns out to be shorter than input string,
           we simply copy the input and return. */
-       if (Z_LVAL_PP(pad_length) < 0 || num_pad_chars < 0) {
+       if (Z_LVAL_PP(pad_length) <= 0 || num_pad_chars <= 0) {
                RETURN_ZVAL(*input, 1, 0);
        }
 



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

Reply via email to