From: Moriyoshi Koizumi Date: Wed, 4 Jun 2003 14:29:43 +0000 (+0000) Subject: Fixed ob_iconv_handler() type mismatch issue on 64bit platforms. X-Git-Tag: RELEASE_1_0_2~430 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0f1f635d00c6c495cc196b2e013ead9e14a7cd09;p=php Fixed ob_iconv_handler() type mismatch issue on 64bit platforms. Patch by Joe Orton --- diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 1d83c3fd16..2395f4a903 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -327,11 +327,10 @@ php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len, const char *out_charset, const char *in_charset) { #if !ICONV_SUPPORTS_ERRNO - unsigned int in_size, out_size, out_left; + size_t in_size, out_size, out_left; char *out_buffer, *out_p; iconv_t cd; size_t result; - typedef unsigned int ucs4_t; *out = NULL; *out_len = 0; @@ -343,7 +342,7 @@ php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len, a single char can be more than 4 bytes. I added 15 extra bytes for safety. */ - out_size = in_len * sizeof(ucs4_t) + 15; + out_size = in_len * sizeof(int) + 15; out_left = out_size; in_size = in_len; @@ -1730,7 +1729,7 @@ PHP_FUNCTION(ob_iconv_handler) { char *out_buffer, *content_type, *mimetype = NULL, *s; zval *zv_string; - unsigned int out_len; + size_t out_len; int mimetype_alloced = 0; long status;