From: Stefan Esser Date: Thu, 14 Nov 2002 16:40:27 +0000 (+0000) Subject: MFH X-Git-Tag: php-4.3.0RC1~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=81cd0ebfa05d09def9e1300be04b711ebd926578;p=php MFH --- diff --git a/main/rfc1867.c b/main/rfc1867.c index 4ce2b07147..f422b7e66c 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -513,7 +513,7 @@ static char *substring_conf(char *start, int len, char quote TSRMLS_DC) #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;