diff options
author | Ard Biesheuvel <abies@php.net> | 2004-03-08 19:08:25 +0000 |
---|---|---|
committer | Ard Biesheuvel <abies@php.net> | 2004-03-08 19:08:25 +0000 |
commit | 1950bdd42cbfc5217380c70220b25a620fd3fe7a (patch) | |
tree | 8e8e8891cbf0aba4a2c42b2633c937bf8a9743ea /ext/xmlrpc | |
parent | 8685972af298c145d65b37fe9458184883fb5186 (diff) | |
download | php-git-1950bdd42cbfc5217380c70220b25a620fd3fe7a.tar.gz |
MFB fix #27408
Diffstat (limited to 'ext/xmlrpc')
-rw-r--r-- | ext/xmlrpc/libxmlrpc/encodings.c | 7 |
1 files 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; |