stas Thu Sep 20 22:35:25 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/iconv iconv.c Log: better fix for iconv_substr http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/iconv.c?r1=1.124.2.8.2.18&r2=1.124.2.8.2.19&diff_format=u Index: php-src/ext/iconv/iconv.c diff -u php-src/ext/iconv/iconv.c:1.124.2.8.2.18 php-src/ext/iconv/iconv.c:1.124.2.8.2.19 --- php-src/ext/iconv/iconv.c:1.124.2.8.2.18 Thu Sep 20 21:55:14 2007 +++ php-src/ext/iconv/iconv.c Thu Sep 20 22:35:24 2007 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: iconv.c,v 1.124.2.8.2.18 2007/09/20 21:55:14 stas Exp $ */ +/* $Id: iconv.c,v 1.124.2.8.2.19 2007/09/20 22:35:24 stas Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -700,7 +700,12 @@ } } - if (offset >= total_len || len > total_len) { + if(len > total_len) { + len = total_len; + } + + + if (offset >= total_len) { return PHP_ICONV_ERR_SUCCESS; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php