iliaa Tue Jan 18 10:51:25 2005 EDT Modified files: (Branch: PHP_4_3) /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.1247.2.806&r2=1.1247.2.807&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.806 php-src/NEWS:1.1247.2.807 --- php-src/NEWS:1.1247.2.806 Tue Jan 18 10:11:21 2005 +++ php-src/NEWS Tue Jan 18 10:51:23 2005 @@ -4,6 +4,7 @@ - Fixed MacOSX shared extensions crashing on Apache startup. (Rasmus) - Added Oracle Instant Client support. (cjbj at hotmail dot com, Tony) - Fixed bug #31580 (fgetcsv() problematic with "" escape sequences). (Ilia) +- 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.333.2.46&r2=1.333.2.47&ty=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.333.2.46 php-src/ext/standard/string.c:1.333.2.47 --- php-src/ext/standard/string.c:1.333.2.46 Wed Nov 3 18:36:02 2004 +++ php-src/ext/standard/string.c Tue Jan 18 10:51:24 2005 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.333.2.46 2004/11/03 23:36:02 derick Exp $ */ +/* $Id: string.c,v 1.333.2.47 2005/01/18 15:51:24 iliaa Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -1575,6 +1575,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