summaryrefslogtreecommitdiff
path: root/ext/exif
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2011-03-14 16:00:59 +0000
committerDmitry Stogov <dmitry@php.net>2011-03-14 16:00:59 +0000
commitbbc879b5870fff8d996b4f227816cb249c4d7839 (patch)
tree159c6eeaa3f992096f7e546111a32c1424f4fecd /ext/exif
parent0be5ca5b3c4dd174f4e50e6a69be2951f6bbecc7 (diff)
downloadphp-git-bbc879b5870fff8d996b4f227816cb249c4d7839.tar.gz
Fixed multibyte related issues
Diffstat (limited to 'ext/exif')
-rw-r--r--ext/exif/exif.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/ext/exif/exif.c b/ext/exif/exif.c
index 13137da838..d6ad8add32 100644
--- a/ext/exif/exif.c
+++ b/ext/exif/exif.c
@@ -2664,13 +2664,13 @@ static int exif_process_user_comment(image_info_type *ImageInfo, char **pszInfoP
decode = ImageInfo->decode_unicode_le;
}
if (zend_multibyte_encoding_converter(
- pszInfoPtr,
+ (unsigned char**)pszInfoPtr,
&len,
- szValuePtr,
+ (unsigned char*)szValuePtr,
ByteCount,
- ImageInfo->encode_unicode,
- decode
- TSRMLS_CC) != 0) {
+ zend_multibyte_fetch_encoding(ImageInfo->encode_unicode TSRMLS_CC),
+ zend_multibyte_fetch_encoding(decode TSRMLS_CC)
+ TSRMLS_CC) < 0) {
len = exif_process_string_raw(pszInfoPtr, szValuePtr, ByteCount);
}
return len;
@@ -2684,13 +2684,13 @@ static int exif_process_user_comment(image_info_type *ImageInfo, char **pszInfoP
szValuePtr = szValuePtr+8;
ByteCount -= 8;
if (zend_multibyte_encoding_converter(
- pszInfoPtr,
+ (unsigned char**)pszInfoPtr,
&len,
- szValuePtr,
+ (unsigned char*)szValuePtr,
ByteCount,
- ImageInfo->encode_jis,
- ImageInfo->motorola_intel ? ImageInfo->decode_jis_be : ImageInfo->decode_jis_le
- TSRMLS_CC) != 0) {
+ zend_multibyte_fetch_encoding(ImageInfo->encode_jis TSRMLS_CC),
+ zend_multibyte_fetch_encoding(ImageInfo->motorola_intel ? ImageInfo->decode_jis_be : ImageInfo->decode_jis_le TSRMLS_CC)
+ TSRMLS_CC) < 0) {
len = exif_process_string_raw(pszInfoPtr, szValuePtr, ByteCount);
}
return len;
@@ -2723,13 +2723,13 @@ static int exif_process_unicode(image_info_type *ImageInfo, xp_field_type *xp_fi
/* Copy the comment */
if (zend_multibyte_encoding_converter(
- &xp_field->value,
+ (unsigned char**)&xp_field->value,
&xp_field->size,
- szValuePtr,
+ (unsigned char*)szValuePtr,
ByteCount,
- ImageInfo->encode_unicode,
- ImageInfo->motorola_intel ? ImageInfo->decode_unicode_be : ImageInfo->decode_unicode_le
- TSRMLS_CC) != 0) {
+ zend_multibyte_fetch_encoding(ImageInfo->encode_unicode TSRMLS_CC),
+ zend_multibyte_fetch_encoding(ImageInfo->motorola_intel ? ImageInfo->decode_unicode_be : ImageInfo->decode_unicode_le TSRMLS_CC)
+ TSRMLS_CC) < 0) {
xp_field->size = exif_process_string_raw(&xp_field->value, szValuePtr, ByteCount);
}
return xp_field->size;