- Fix a trivial bug in iconv. When there is no space to perform the
conversion, conversion must fail and errno must be set to E2BIG. PR: standards/160673 Submitted by: Henning Petersen <henning.petersen@t-online.de> Reviewed by: pluknet Approved by: re (kib), delphij (mentor)
This commit is contained in:
parent
8046e2fda0
commit
0e6d7a0efa
@ -190,7 +190,6 @@ _citrus_NONE_stdenc_wctomb(struct _citrus_stdenc * __restrict ce __unused,
|
||||
void * __restrict pspriv __unused, size_t * __restrict nresult,
|
||||
struct iconv_hooks *hooks __unused)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if ((wc & ~0xFFU) != 0) {
|
||||
*nresult = (size_t)-1;
|
||||
@ -198,7 +197,7 @@ _citrus_NONE_stdenc_wctomb(struct _citrus_stdenc * __restrict ce __unused,
|
||||
}
|
||||
if (n == 0) {
|
||||
*nresult = (size_t)-1;
|
||||
ret = E2BIG;
|
||||
return (E2BIG);
|
||||
}
|
||||
|
||||
*nresult = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user