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:
parent
78fd0ca9e8
commit
7f9185383f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user