Bug 2502 - iconv complains about seemingly valid UTF-7 input
Summary: iconv complains about seemingly valid UTF-7 input
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.3.6
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-02 19:36 UTC by Vadim Zeitlin
Modified: 2019-04-10 09:29 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vadim Zeitlin 2006-04-02 19:36:36 UTC
I must be missing something but why in C locale do I get this

% echo '+' | iconv -t utf7  # ok so far
+-
% echo -n '+' | iconv -t utf7;echo # and it's the same thing without newline
+-
% echo '+-' | iconv -f utf7 # and it works in the other direction too, good
+
% echo -n '+-' | iconv -f utf7 # but why doesn't it work without newline?
iconv: incomplete character or shift sequence at end of buffer

"+-" sequence seems to be valid UTF-7 according to my reading of RFC 1642 and
I'd also expect UTF-7 transformation to be reversible.
Comment 1 Ulrich Drepper 2006-05-02 05:18:09 UTC
Fix in the upstream CVS.