From: Sara Golemon Date: Thu, 25 Aug 2005 08:59:24 +0000 (+0000) Subject: sizeof(char) != sizeof(UChar) Don't tell ucnv_toUnicode it has more space than it... X-Git-Tag: PRE_NEW_OCI8_EXTENSION~94 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=23b729dc15ab95b79cdc5715a8bb533c94ce3da4;p=php sizeof(char) != sizeof(UChar) Don't tell ucnv_toUnicode it has more space than it really does --- diff --git a/ext/unicode/unicode_filter.c b/ext/unicode/unicode_filter.c index 5c645d05da..3f28c9b09a 100644 --- a/ext/unicode/unicode_filter.c +++ b/ext/unicode/unicode_filter.c @@ -144,7 +144,7 @@ static php_stream_filter_status_t php_unicode_from_string_filter( destp = destbuf = (UChar *)pemalloc(destlen, data->is_persistent); - ucnv_toUnicode(data->conv, &destp, destbuf + destlen, (const char**)&src, src + remaining, NULL, FALSE, &errCode); + ucnv_toUnicode(data->conv, &destp, (UChar*)((char*)destbuf + destlen), (const char**)&src, src + remaining, NULL, FALSE, &errCode); new_bucket = php_stream_bucket_new_unicode(stream, destbuf, destp - destbuf, 1, data->is_persistent TSRMLS_CC); php_stream_bucket_append(buckets_out, new_bucket TSRMLS_CC);