This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Forward: fix EUC-TW return value of TO_LOOP


My co-worker found a problem in euc-tw converter.
Please find the test case, patch, and changelog entry in the attached mail.

If you have any problems or questions, please let us know.

Isamu Hasegawa
IBM Japan, Ltd.

--- Begin Message ---
 I found that return value of EUC-TW TO_LOOP is wrong.

 When it comes out of space to write converted string, it should return 
As a result, programs can not handle the error properly.

 Attached program tests this situation simply.  When output buffer
is insufficient, errno should set E2BIG, but the result will be
EINVAL when convert to EUC-TW.  While converting to EUC-JP, it returns 
E2BIG correctly.  Of course, both of case, it converts proper multibyte 
string, if output buffer is enough to write.

2003-03-25  Jiro SEKIBA  <jir at yamato dot ibm dot com>

	* iconvdata/euc-tw.c (from_euc_tw): Fix return value of TO_LOOP.

Jiro SEKIBA | AP Linux Technology Center, Yamato Software Lab., IBM Japan
            | email: jir at yamato dot ibm dot com, jir at li18nux dot org, jir at openi18n dot org

Attachment: euc-tw.patch
Description: Binary data

Attachment: iconv-euctw.c
Description: Binary data

--- End Message ---

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]