From 2ce70ac4bea613f8567061c7b2e14cb60e6111ec Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Fri, 1 May 2009 00:18:09 +0000 Subject: [PATCH] cleanup --- main/rfc1867.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/main/rfc1867.c b/main/rfc1867.c index f3c8a7745a..1014ac3c2e 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -202,14 +202,10 @@ static inline UChar *php_ap_to_unicode(char *in, int32_t in_len, int32_t *out_le UErrorCode status = U_ZERO_ERROR; UChar *buf; int buf_len = 0; - UConverter *input_conv = UG(http_input_encoding_conv); + UConverter *input_conv = ZEND_U_CONVERTER(UG(http_input_encoding_conv)); - if (!input_conv) { - input_conv = ZEND_U_CONVERTER(UG(output_encoding_conv)); - } - - input_conv = ZEND_U_CONVERTER(UG(output_encoding_conv)); zend_string_to_unicode_ex(input_conv, &buf, &buf_len, in, in_len, &status); + if (U_SUCCESS(status)) { if (out_len) *out_len = buf_len; @@ -1134,6 +1130,9 @@ var_done: efree(array_index); } array_index = eustrndup(start_arr+1, array_len-2); + + if (abuf) efree(abuf); + abuf = eustrndup(param, u_strlen(param)-array_len); } if (lbuf) { @@ -1142,11 +1141,6 @@ var_done: llen = u_strlen(param) + MAX_SIZE_OF_INDEX + 1; lbuf = eumalloc(llen); - if (is_arr_upload) { - if (abuf) efree(abuf); - abuf = eustrndup(param, u_strlen(param)-array_len); - } - /* The \ check should technically be needed for win32 systems only where * it is a valid path separator. However, IE in all its wisdom always sends * the full path of the file on the user's filesystem, which means that unless -- 2.50.1