]> git.eshelyaron.com Git - emacs.git/commitdiff
(decode_coding_sjis): Check bytes more rigidly.
authorKenichi Handa <handa@m17n.org>
Wed, 9 Jul 2003 02:16:17 +0000 (02:16 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 9 Jul 2003 02:16:17 +0000 (02:16 +0000)
src/coding.c

index 908a78f2c8aa77b2ef342fe54cacaab78c15fdfd..e5f1ae82cd5653b57e0d2edaef676de3821c1178 100644 (file)
@@ -3987,12 +3987,14 @@ decode_coding_sjis (coding)
                  SJIS_TO_JIS (c);
                  charset = charset_kanji;
                }
-             else
+             else if (c > 0xA0)
                {
                  /* SJIS -> JISX0201-Kana */
                  c &= 0x7F;
                  charset = charset_kana;
                }
+             else
+               goto invalid_code;
            }
          if (charset->id != charset_ascii
              && last_id != charset->id)