This is the mail archive of the glibc-bugs@sourceware.org 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]

[Bug libc/1383] iconv doesn't detect invalid UTF-8 input as early as possible


------- Additional Comments From drepper at redhat dot com  2005-10-14 06:05 -------
Look at your code:

        cd = iconv_open("UTF-8", argv[2]);

This line uses the command line parameter as the *source* encoding, not the
target encoding.  This means the behavior is perfectly fine.  For less than 4
bytes of input EINVAL is returned, with 4 bytes of input a really high number is
used as the UCS-4 value and it has no UTF-8 equivalent.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


http://sourceware.org/bugzilla/show_bug.cgi?id=1383

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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