contain \0's and not end in \0).
# and recode_string is recode_buffer_to_buffer internally anyways
pval **str;
pval **req;
bool success;
+ int r_len=0, r_alen =0;
ReSLS_FETCH();
if (ZEND_NUM_ARGS() != 2
goto error_exit;
}
- r = recode_string(request, (*str)->value.str.val);
+ recode_buffer_to_buffer(request, Z_STRVAL_PP(str), Z_STRLEN_PP(str), &r, &r_len, &r_alen);
if (!r) {
php_error(E_WARNING, "Recoding failed.");
goto error_exit;
}
- RETVAL_STRING(r, 1);
+ RETVAL_STRINGL(r, r_len, 1);
free(r);
/* FALLTHROUGH */