From 1950bdd42cbfc5217380c70220b25a620fd3fe7a Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Mon, 8 Mar 2004 19:08:25 +0000 Subject: [PATCH] MFB fix #27408 --- ext/xmlrpc/libxmlrpc/encodings.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ext/xmlrpc/libxmlrpc/encodings.c b/ext/xmlrpc/libxmlrpc/encodings.c index 8f7d33ea43..f3aebff9c9 100644 --- a/ext/xmlrpc/libxmlrpc/encodings.c +++ b/ext/xmlrpc/libxmlrpc/encodings.c @@ -57,11 +57,10 @@ static char* convert(const char* src, int src_len, int *new_len, const char* fro char* outbuf = 0; if(src && src_len && from_enc && to_enc) { - int outlenleft = src_len; + size_t outlenleft = src_len; + size_t inlenleft = src_len; int outlen = src_len; - int inlenleft = src_len; iconv_t ic = iconv_open(to_enc, from_enc); - char* src_ptr = (char*)src; char* out_ptr = 0; if(ic != (iconv_t)-1) { @@ -71,7 +70,7 @@ static char* convert(const char* src, int src_len, int *new_len, const char* fro if(outbuf) { out_ptr = (char*)outbuf; while(inlenleft) { - st = iconv(ic, &src_ptr, &inlenleft, &out_ptr, &outlenleft); + st = iconv(ic, &src, &inlenleft, &out_ptr, &outlenleft); if(st == -1) { if(errno == E2BIG) { int diff = out_ptr - outbuf; -- 2.40.0