sesser Thu Nov 14 11:30:08 2002 EDT
Modified files:
/php4/main rfc1867.c
Log:
Fixing possible remote overflow due to mbstring translation.
Index: php4/main/rfc1867.c
diff -u php4/main/rfc1867.c:1.122 php4/main/rfc1867.c:1.123
--- php4/main/rfc1867.c:1.122 Wed Oct 23 22:59:01 2002
+++ php4/main/rfc1867.c Thu Nov 14 11:30:07 2002
@@ -16,7 +16,7 @@
| Jani Taskinen <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: rfc1867.c,v 1.122 2002/10/24 02:59:01 moriyoshi Exp $ */
+/* $Id: rfc1867.c,v 1.123 2002/11/14 16:30:07 sesser Exp $ */
/*
* This product includes software developed by the Apache Group
@@ -513,7 +513,7 @@
#if HAVE_MBSTRING && !defined(COMPILE_DL_MBSTRING)
if (php_mb_encoding_translation(TSRMLS_C)) {
size_t j = php_mb_mbchar_bytes(start+i TSRMLS_CC);
- while (j-- > 0) {
+ while (j-- > 0 && i < len) {
*resp++ = start[i++];
}
--i;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php