Improve iconvbufs() to do more buffer size checks.
authorWayne Davison <wayned@samba.org>
Sun, 19 May 2013 23:56:34 +0000 (23:56 +0000)
committerWayne Davison <wayned@samba.org>
Sun, 19 May 2013 23:56:34 +0000 (23:56 +0000)
commitcb784f18ec02778419c58896cabbb418f5512ae1
treea4893224ba18e7f24618f82314744f6f192762bf
parent2dc2070992c00ea6625031813f2b6c886ddc3ade
Improve iconvbufs() to do more buffer size checks.

- If iconv() returns EINVAL or EILSEQ and the error is being ignored, make
  sure that there is room in the output buffer to store the erroneous char.
- When accepting an erroneous char, be sure to break if there are no more
  input characters (without calling iconv() with a zero input length).
rsync.c