Bug 497267
Summary: | Bug in SHIFT_JIS EILSEQ handling | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Behdad Esfahbod <behdad> | ||||
Component: | glibc | Assignee: | Jakub Jelinek <jakub> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | low | ||||||
Version: | rawhide | CC: | jakub | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2009-04-27 20:11:21 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Behdad Esfahbod
2009-04-23 05:18:29 UTC
Testcase is missing... I've tried: #include <iconv.h> #include <assert.h> #include <errno.h> int main (void) { iconv_t i1 = iconv_open ("ISO-8859-1//", "UTF-8//"); iconv_t i2 = iconv_open ("UTF-8//", "SHIFT-JIS//"); char *inbuf, *outbuf, buf[64]; size_t inbytesleft, outbytesleft, res; inbuf = "\x83\x83\x83"; inbytesleft = 3; outbuf = buf; outbytesleft = 64; errno = 0; res = iconv (i1, &inbuf, &inbytesleft, &outbuf, &outbytesleft); assert (res == (size_t) -1 && errno == EILSEQ && inbytesleft == 3 && outbytesleft == 64); inbuf = "\xec\x98\x8c"; inbytesleft = 3; outbuf = buf; outbytesleft = 64; errno = 0; res = iconv (i2, &inbuf, &inbytesleft, &outbuf, &outbytesleft); assert (res == (size_t) -1 && errno == EILSEQ && inbytesleft == 3 && outbytesleft == 64); return 0; } but that works as expected. Created attachment 341034 [details]
test case
Sorry. I'm sure I attached in the original report form...
Anyway, seems to work for "\xec\x98\x8c", but not for "x\x98\x8c".
Should be fixed in glibc-2.9.90-22. Thanks. |