svn commit: r225678 - head/lib/libc/iconv
Gabor Kovesdan
gabor at FreeBSD.org
Mon Sep 19 22:49:36 UTC 2011
Author: gabor
Date: Mon Sep 19 22:49:36 2011
New Revision: 225678
URL: http://svn.freebsd.org/changeset/base/225678
Log:
- 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 at t-online.de>
Reviewed by: pluknet
Approved by: re (kib), delphij (mentor)
Modified:
head/lib/libc/iconv/citrus_none.c
Modified: head/lib/libc/iconv/citrus_none.c
==============================================================================
--- head/lib/libc/iconv/citrus_none.c Mon Sep 19 22:35:54 2011 (r225677)
+++ head/lib/libc/iconv/citrus_none.c Mon Sep 19 22:49:36 2011 (r225678)
@@ -190,7 +190,6 @@ _citrus_NONE_stdenc_wctomb(struct _citru
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 _citru
}
if (n == 0) {
*nresult = (size_t)-1;
- ret = E2BIG;
+ return (E2BIG);
}
*nresult = 1;
More information about the svn-src-all
mailing list