Temporary restore a part of rev 1.6.

We must not increase a capability of buffer size here,
because codes which call these functions expect that dst and src
are the same size.
This will cause problem when someone convert a character whose
length is different between charsets on smbfs which was changed
to use xlat16 converter.
This commit is contained in:
imura 2005-07-23 16:52:57 +00:00
parent 78fd0ca9e8
commit 7f9185383f

View File

@ -458,8 +458,7 @@ iconv_convstr(void *handle, char *dst, const char *src)
strcpy(dst, src);
return dst;
}
inlen = strlen(src);
outlen = inlen * 3;
inlen = outlen = strlen(src);
error = iconv_conv(handle, NULL, NULL, &p, &outlen);
if (error)
return NULL;
@ -484,8 +483,7 @@ iconv_convmem(void *handle, void *dst, const void *src, int size)
memcpy(dst, src, size);
return dst;
}
inlen = size;
outlen = inlen * 3;
inlen = outlen = size;
error = iconv_conv(handle, NULL, NULL, &d, &outlen);
if (error)
return NULL;