Update.
authorUlrich Drepper <drepper@redhat.com>
Wed, 8 Dec 1999 04:56:09 +0000 (04:56 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 8 Dec 1999 04:56:09 +0000 (04:56 +0000)
* iconvdata/ansi_x3.110.c (from_ansi_x3_110): Don't increment
pointers if character is illegal.
Reported by Bruno Haible <haible@ilog.fr>.

Reported by Bruno Haible <haible@ilog.fr>.

ChangeLog
iconvdata/ansi_x3.110.c

index fe45168..0cb37f0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,11 +1,16 @@
 1999-12-07  Ulrich Drepper  <drepper@cygnus.com>
 
+       * iconvdata/ansi_x3.110.c (from_ansi_x3_110): Don't increment
+       pointers if character is illegal.
+       Reported by Bruno Haible <haible@ilog.fr>.
+
        * iconv/gconv_db.c (gen_steps): Set __counter initialy to 1.
        (increment_counter): New function.  Broken out of find_derivation.
        (find_derivation): No need for a lock.  Increment counter only when
        the derivation was already available.
        * iconv/gconv_dl.c: Add debugging functions.
        (known_compare): We have to use strcmp.
+       Reported by Bruno Haible <haible@ilog.fr>.
 
 1999-12-06  Ulrich Drepper  <drepper@cygnus.com>
 
index 9371c5a..35658b5 100644 (file)
@@ -399,6 +399,7 @@ static const char from_ucs4[][2] =
 #define BODY \
   {                                                                          \
     uint32_t ch = *inptr;                                                    \
+    int incr;                                                                \
                                                                              \
     if (ch >= 0xc1 && ch <= 0xcf)                                            \
       {                                                                              \
@@ -424,12 +425,12 @@ static const char from_ucs4[][2] =
                                                                              \
        ch = to_ucs4_comb[ch - 0xc1][ch2 - 0x20];                             \
                                                                              \
-       inptr += 2;                                                           \
+       incr = 2;                                                             \
       }                                                                              \
     else                                                                     \
       {                                                                              \
        ch = to_ucs4[ch];                                                     \
-       ++inptr;                                                              \
+       incr = 1;                                                             \
       }                                                                              \
                                                                              \
     if (ch == 0 && *inptr != '\0')                                           \
@@ -439,6 +440,7 @@ static const char from_ucs4[][2] =
        break;                                                                \
       }                                                                              \
                                                                              \
+    inptr += incr;                                                           \
     *((uint32_t *) outptr)++ = ch;                                           \
   }
 #include <iconv/loop.c>