<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libiconv_modules, branch release/10.3.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F10.3.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F10.3.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2015-12-04T18:14:31Z</updated>
<entry>
<title>MFC r289393:</title>
<updated>2015-12-04T18:14:31Z</updated>
<author>
<name>Bryan Drewery</name>
<email>bdrewery@FreeBSD.org</email>
</author>
<published>2015-12-04T18:14:31Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=677dfcac9f405eb023fb1a69ce77249e89210cf1'/>
<id>urn:sha1:677dfcac9f405eb023fb1a69ce77249e89210cf1</id>
<content type='text'>
  Add more SUBDIR_PARALLEL.
</content>
</entry>
<entry>
<title>MFC r283406,283418:</title>
<updated>2015-06-02T09:42:00Z</updated>
<author>
<name>Tijl Coosemans</name>
<email>tijl@FreeBSD.org</email>
</author>
<published>2015-06-02T09:42:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4fb8a6b5f8bf67077317984c7cdc34ca8127c0f7'/>
<id>urn:sha1:4fb8a6b5f8bf67077317984c7cdc34ca8127c0f7</id>
<content type='text'>
Fix decoding of UTF-7 when a base64 encoded chunk appears at the end of
the input buffer.

_citrus_UTF7_mbtoutf16 stored the decoder state at the beginning so it
could restore this state on an incomplete character such that the next
call would restart the decoding.  The problem was that "-" (end of base64
mode) at the end of a string was also treated as an incomplete character
but was also removed from the state buffer.  So the initial state would be
restored (with base64 mode) and the next call would no longer see the "-"
so it continued in base64 mode.

This state saving/restoring isn't needed here.  It's already handled
elsewhere (citrus_iconv_std.c:_citrus_iconv_std_iconv_convert) so just
remove it.

Also initialise *nresult.

When only 2 bytes can be read from a 4 byte UTF-16 character in a base64
encoded chunk of a UTF-7 string, treat that as an incomplete character and
return an error instead of a shift sequence and no error.

Also check that the low 2 bytes have a valid value.

PR:		200398
</content>
</entry>
<entry>
<title>MFC r275805:</title>
<updated>2015-04-30T16:08:47Z</updated>
<author>
<name>Tijl Coosemans</name>
<email>tijl@FreeBSD.org</email>
</author>
<published>2015-04-30T16:08:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=cb784c9f283e7e1908b76643109bd98a527a13c4'/>
<id>urn:sha1:cb784c9f283e7e1908b76643109bd98a527a13c4</id>
<content type='text'>
Fix incorrect type of "invalids" argument in __iconv() prototype.

MFC r281550,281591:

Remove the const qualifier from iconv(3) to comply with POSIX:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/iconv.html

Adjust all code that calls iconv.

PR:		199099
</content>
</entry>
<entry>
<title>MFC r267436-267439:</title>
<updated>2014-06-20T07:32:03Z</updated>
<author>
<name>Tijl Coosemans</name>
<email>tijl@FreeBSD.org</email>
</author>
<published>2014-06-20T07:32:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=dd34d1a60d07a34a0a96e576180f2523358314e1'/>
<id>urn:sha1:dd34d1a60d07a34a0a96e576180f2523358314e1</id>
<content type='text'>
- Replace malloc+memset with calloc.
- iconv_open(3): initialise ci_ilseq_invalid field of _citrus_iconv_shared
  struct after allocation with malloc.
- iconvlist(3): reduce a memory leak by copying strings only once.
- iconv(1):
  - Make invalids variable local to do_conv such that it prints the number
    of invalid characters of the current file instead of an accumulated
    value.
  - Make do_conv return an error when invalid characters have been found.
    Return EXIT_FAILURE from main if any file contained invalid characters.
    This matches the behaviour of GNU iconv.
  - Mark usage with __dead2 attribute.
  - Make the long_options array const.

Tested by:	Pavel Timofeev &lt;timp87@gmail.com&gt;
</content>
</entry>
<entry>
<title>MFC r263986:</title>
<updated>2014-04-15T09:49:44Z</updated>
<author>
<name>Tijl Coosemans</name>
<email>tijl@FreeBSD.org</email>
</author>
<published>2014-04-15T09:49:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c4ccef17ec0b52949365b916a09cfa005ea24f88'/>
<id>urn:sha1:c4ccef17ec0b52949365b916a09cfa005ea24f88</id>
<content type='text'>
- In the libiconv module for ISO 2022 restore the original order of the
  fields of a private struct such that variables of this type are
  initialised correctly.  Fixes conversion from ISO 2022.
  Also do this in the BIG5 module to prevent similar errors in the future.
- In the libiconv module for EUC-TW replace 2^cs with 1&lt;&lt;cs.  Fixes
  conversion from EUC-TW.
- Synchronise iconv code with NetBSD.  In most cases this only updates
  the RCS id because the changes are already there or are NetBSD specific.
  + libc/iconv/citrus_csmapper.c: Add a comment.
  + libc/iconv/citrus_db_factory.c: Remove put16().
  + libc/iconv/citrus_iconv.c: Return EINVAL on error.
  + libc/iconv/citrus_mapper.c: Return EINVAL on error.
  + libc/iconv/citrus_memstream.c: Fix type of a variable.
  + libc/iconv/citrus_prop.h: Sync definition of _CITRUS_PROP_HINT_END.
  + libc/iconv/citrus_stdenc.c: Return EINVAL on error.
  + libiconv_modules/mapper_std/citrus_mapper_std.c: Plug memory leak.

Obtained from:	NetBSD
</content>
</entry>
<entry>
<title>MFC r262441-262442,262447,262461-262464,262655:</title>
<updated>2014-03-04T11:43:01Z</updated>
<author>
<name>Tijl Coosemans</name>
<email>tijl@FreeBSD.org</email>
</author>
<published>2014-03-04T11:43:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=13361a758eb8432624f67ea5b53cb302a04a4f7d'/>
<id>urn:sha1:13361a758eb8432624f67ea5b53cb302a04a4f7d</id>
<content type='text'>
- 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 &lt;manuel-freebsd@mausz.at&gt;
</content>
</entry>
<entry>
<title>MFC r260334:</title>
<updated>2014-01-09T23:08:56Z</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2014-01-09T23:08:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e927af37bd1f0262cea3c2911bd4d5c71dab193b'/>
<id>urn:sha1:e927af37bd1f0262cea3c2911bd4d5c71dab193b</id>
<content type='text'>
Split the last gcc-specific flags off into CFLAGS.gcc.  This also
removes the need to use -Qunused-arguments for clang throughout the
tree.

MFC r260369:

Apply band-aid for 32-bit compat libs failures after r260334: put back
-Qunused-arguments for clang for now, until I can figure out a way to
make it unneeded in all scenarios.  Sorry about the breakage.
</content>
</entry>
<entry>
<title>MFC r260003:</title>
<updated>2014-01-04T17:27:43Z</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2014-01-04T17:27:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=265823fb2df6b2d9cbebf45dc1bd091fe9eb2da1'/>
<id>urn:sha1:265823fb2df6b2d9cbebf45dc1bd091fe9eb2da1</id>
<content type='text'>
In libiconv_modules, surround unused static _citrus_XXX_pack_state() and
_citrus_XXX_unpack_state() functions with #if 0, for now.
</content>
</entry>
<entry>
<title>MFC r258316:</title>
<updated>2013-11-23T12:17:05Z</updated>
<author>
<name>Tijl Coosemans</name>
<email>tijl@FreeBSD.org</email>
</author>
<published>2013-11-23T12:17:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=258e8beb5321f3b35af6468a9e97e53719a75188'/>
<id>urn:sha1:258e8beb5321f3b35af6468a9e97e53719a75188</id>
<content type='text'>
Bug fixes in iconv(3) UTF-7 support.

- Add ' to the list of directly encoded characters and * to the list of
  optionally directly encoded characters as per RFC 2152.

- In _citrus_UTF7_mbtoutf16 on end of input when the next output character
  has only been partially decoded, save a copy of the buffer of input
  characters (not just its length).  On the next call with more input
  characters this buffer is reprocessed together with the new input to
  form a fully decoded output character.

- At the end of a base64 encoded sequence fully discard '-' (BASE64_OUT)
  by decrementing psenc-&gt;chlen and i.  This is needed to make room in
  psenc-&gt;ch (input buffer) in case the next input character starts a new
  base64 encoded sequence.  And also, if this is the end of input and no
  output character can be returned, this brings the encoder in the initial
  state as indicated by _citrus_UTF7_stdenc_get_state_desc_generic which
  is used by the caller to distinguish between no output and partial
  output.

- In _citrus_UTF7_mbrtowc_priv pass the s parameter (input pointer)
  directly to _citrus_UTF7_mbtoutf16 instead of a copy (s0).  This way s
  is updated correctly in case of errors.

- In _citrus_UTF7_mbrtowc_priv when called with psenc-&gt;surrogate set
  (previous call did not have enough input), retrieve the previously
  decoded UTF-16 character from (psenc-&gt;cache &gt;&gt; psenc-&gt;bits) instead of
  (psenc-&gt;cache &gt;&gt; 2).

Approved by:	re (kib)
</content>
</entry>
<entry>
<title>Use Makefile.inc instead of .export.</title>
<updated>2013-09-06T10:40:38Z</updated>
<author>
<name>David Chisnall</name>
<email>theraven@FreeBSD.org</email>
</author>
<published>2013-09-06T10:40:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=feae3109e8d4a501ca91f19c95a78b5d0bfbdda4'/>
<id>urn:sha1:feae3109e8d4a501ca91f19c95a78b5d0bfbdda4</id>
<content type='text'>
</content>
</entry>
</feed>
