iliaa Tue Jan 18 10:47:57 2005 EDT Modified files: /php-src/ext/standard string.c Log: Fixed bug #31479 (Fixed crash in chunk_split(), when chunklen > strlen). http://cvs.php.net/diff.php/php-src/ext/standard/string.c?r1=1.427&r2=1.428&ty=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.427 php-src/ext/standard/string.c:1.428 --- php-src/ext/standard/string.c:1.427 Sun Nov 21 08:35:32 2004 +++ php-src/ext/standard/string.c Tue Jan 18 10:47:57 2005 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.427 2004/11/21 13:35:32 tony2001 Exp $ */ +/* $Id: string.c,v 1.428 2005/01/18 15:47:57 iliaa Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -1890,6 +1890,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