iliaa           Tue Jan 18 10:48:39 2005 EDT

  Modified files:              (Branch: PHP_5_0)
    /php-src    NEWS 
    /php-src/ext/standard       string.c 
  Log:
  MFH: Fixed bug #31479 (Fixed crash in chunk_split(), when chunklen > strlen).
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.193&r2=1.1760.2.194&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.193 php-src/NEWS:1.1760.2.194
--- php-src/NEWS:1.1760.2.193   Tue Jan 18 10:07:10 2005
+++ php-src/NEWS        Tue Jan 18 10:48:38 2005
@@ -4,6 +4,7 @@
 - Added Oracle Instant Client support. (cjbj at hotmail dot com, Tony)
 - Added length and charsetnr for field array and object in mysqli. (Georg)
 - Fixed a bug in mysqli_stmt_execute() (type conversion with NULL values). 
(Georg)
+- Fixed bug #31479 (Fixed crash in chunk_split(), when chunklen > strlen). 
(Ilia)
 - Fixed bug #31454 (session_set_save_handler crashes PHP when supplied 
   non-existent object ref). (Tony)
 - Fixed bug #31444 (Memory leak in zend_language_scanner.c).
http://cvs.php.net/diff.php/php-src/ext/standard/string.c?r1=1.420.2.4&r2=1.420.2.5&ty=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.420.2.4 
php-src/ext/standard/string.c:1.420.2.5
--- php-src/ext/standard/string.c:1.420.2.4     Sun Nov 21 08:35:50 2004
+++ php-src/ext/standard/string.c       Tue Jan 18 10:48:39 2005
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: string.c,v 1.420.2.4 2004/11/21 13:35:50 tony2001 Exp $ */
+/* $Id: string.c,v 1.420.2.5 2005/01/18 15:48:39 iliaa Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -1838,6 +1838,10 @@
                RETURN_FALSE;
        }
 
+       if (chunklen > Z_STRLEN_PP(p_str)) {
+               RETURN_STRINGL(Z_STRVAL_PP(p_str), Z_STRLEN_PP(p_str), 1);      
+       }
+
        if (!Z_STRLEN_PP(p_str)) {
                RETURN_EMPTY_STRING();
        }

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

Reply via email to