diff options
author | tijl <tijl@FreeBSD.org> | 2014-03-04 11:43:01 +0000 |
---|---|---|
committer | tijl <tijl@FreeBSD.org> | 2014-03-04 11:43:01 +0000 |
commit | 64a908c93597fc7a32a06f4c07bfd9c9006c6062 (patch) | |
tree | 5045c4e0aaa9e69b40b3b439246baa178fa13df7 /lib/libc/iconv/citrus_prop.c | |
parent | 4dd6e22c185e4b2e10499d050b5f3a25354a0f02 (diff) | |
download | FreeBSD-src-64a908c93597fc7a32a06f4c07bfd9c9006c6062.zip FreeBSD-src-64a908c93597fc7a32a06f4c07bfd9c9006c6062.tar.gz |
MFC r262441-262442,262447,262461-262464,262655:
- Consistently pass around context information using a simple pointer.
This fixes some dereferencing bugs in Chinese character set conversions.
- Fix Simplified Chinese character set conversions by switching around the
fields of an internal struct so it corresponds with the way variables of
this type are initialised.
- Fix an array index out of bounds bug in iconv VIQR (Vietnamese) module.
- Silence gcc warning about unsigned comparison with 0.
Also record r258316 and r258587 as merged so they no longer show up as
eligible.
PR: 185964
Submitted by: Manuel Mausz <manuel-freebsd@mausz.at>
Diffstat (limited to 'lib/libc/iconv/citrus_prop.c')
-rw-r--r-- | lib/libc/iconv/citrus_prop.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libc/iconv/citrus_prop.c b/lib/libc/iconv/citrus_prop.c index c2d4829..0e6d34a 100644 --- a/lib/libc/iconv/citrus_prop.c +++ b/lib/libc/iconv/citrus_prop.c @@ -339,7 +339,7 @@ name_found: static int _citrus_prop_parse_element(struct _memstream * __restrict ms, - const _citrus_prop_hint_t * __restrict hints, void ** __restrict context) + const _citrus_prop_hint_t * __restrict hints, void * __restrict context) { int ch, errnum; #define _CITRUS_PROP_HINT_NAME_LEN_MAX 255 @@ -435,8 +435,7 @@ _citrus_prop_parse_variable(const _citrus_prop_hint_t * __restrict hints, if (ch == EOF || ch == '\0') break; _memstream_ungetc(&ms, ch); - errnum = _citrus_prop_parse_element( - &ms, hints, (void ** __restrict)context); + errnum = _citrus_prop_parse_element(&ms, hints, context); if (errnum != 0) return (errnum); } |