Skip to content

Commit da28821

Browse files
committed
Fix a bad bug.
1 parent af317e2 commit da28821

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

extras/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2003-05-10 Bruno Haible <bruno@clisp.org>
2+
3+
* iconv_string.c (iconv_string): Don't return -1 just because the
4+
string is longer than 4 KB.
5+
16
2002-02-13 Bruno Haible <bruno@clisp.org>
27

38
* iconv.m4: Remove file. Obsoleted by m4/iconv.m4.

extras/iconv_string.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (C) 1999-2001 Bruno Haible.
1+
/* Copyright (C) 1999-2001, 2003 Bruno Haible.
22
This file is not part of the GNU LIBICONV Library.
33
This file is put into the public domain. */
44

@@ -75,7 +75,7 @@ int iconv_string (const char* tocode, const char* fromcode,
7575
char* outptr = tmpbuf;
7676
size_t outsize = tmpbufsize;
7777
size_t res = iconv(cd,&inptr,&insize,&outptr,&outsize);
78-
if (res == (size_t)(-1)) {
78+
if (res == (size_t)(-1) && errno != E2BIG) {
7979
if (errno == EINVAL)
8080
break;
8181
else {

0 commit comments

Comments
 (0)