diff options
author | Martin Sebor <msebor@redhat.com> | 2016-01-15 11:25:13 -0700 |
---|---|---|
committer | Martin Sebor <msebor@redhat.com> | 2016-01-15 11:25:13 -0700 |
commit | 692de4b3960dc90bdcfb871513ee4d81d314cf69 (patch) | |
tree | 55f06774f980c8b9e621701a2383df12aa479236 /iconvdata/ibm930.c | |
parent | f2b3078e6a20211233d4971653838e06d048296a (diff) | |
download | glibc-692de4b3960dc90bdcfb871513ee4d81d314cf69.tar.gz glibc-692de4b3960dc90bdcfb871513ee4d81d314cf69.tar.xz glibc-692de4b3960dc90bdcfb871513ee4d81d314cf69.zip |
Have iconv accept redundant escape sequences in IBM900, IBM903, IBM905,
IBM907, and IBM909. Patch for bug #17197 changes the encoder to avoid generating redundant shift sequences. However, those sequences may already be present in data encododed by prior versions of the encoder. This change modifies the decoder to also avoid rejecting redundant shift sequences. [BZ #19432] * iconvdata/Makefile: Add bug-iconv11. * iconvdata/bug-iconv11.c: New test. * iconvdata/ibm930.c: Do not reject redundant shift sequences. * iconvdata/ibm933.c: Same. * iconvdata/ibm935.c: Same. * iconvdata/ibm937.c: Same. * iconvdata/ibm939.c: Same.
Diffstat (limited to 'iconvdata/ibm930.c')
-rw-r--r-- | iconvdata/ibm930.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/iconvdata/ibm930.c b/iconvdata/ibm930.c index 1f60962d86..9d35734b3a 100644 --- a/iconvdata/ibm930.c +++ b/iconvdata/ibm930.c @@ -110,24 +110,14 @@ enum \ if (__builtin_expect (ch, 0) == SO) \ { \ - /* Shift OUT, change to DBCS converter. */ \ - if (curcs == db) \ - { \ - result = __GCONV_ILLEGAL_INPUT; \ - break; \ - } \ + /* Shift OUT, change to DBCS converter (redundant escape okay). */ \ curcs = db; \ ++inptr; \ continue; \ } \ else if (__builtin_expect (ch, 0) == SI) \ { \ - /* Shift IN, change to SBCS converter */ \ - if (curcs == sb) \ - { \ - result = __GCONV_ILLEGAL_INPUT; \ - break; \ - } \ + /* Shift IN, change to SBCS converter (redundant escape okay). */ \ curcs = sb; \ ++inptr; \ continue; \ |