Skip to content
Browse files

Avoid spurious errors converting characters

E2BIG error must be handled only for final chunk.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
  • Loading branch information...
1 parent 4abcaf5 commit efec69ee1d4d9dabd99b27e19b462fa7c25df120 @freddy77 freddy77 committed Feb 15, 2014
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/tds/stream.c
View
1 src/tds/stream.c
@@ -110,6 +110,7 @@ tds_convert_stream(TDSSOCKET * tds, TDSICONV * char_conv, TDS_ICONV_DIRECTION di
ol = ostream->buf_len;
/* FIXME not for last */
suppress->einval = 1; /* EINVAL matters only on the last chunk. */
+ suppress->e2big = 1;
ol = tds_iconv(tds, char_conv, direction, (const char **) &ib, &bufleft, &ob, &ol);
conv_errno = errno;

0 comments on commit efec69e

Please sign in to comment.
Something went wrong with that request. Please try again.