[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r118046: coding.c (detect_coding_iso_2022): Set codi
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] trunk r118046: coding.c (detect_coding_iso_2022): Set coding->rejected correctly when an invalid escape sequence is found (Bug#18610). |
Date: |
Sun, 05 Oct 2014 08:19:11 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 118046 [merge]
revision-id: address@hidden
parent: address@hidden
parent: address@hidden
committer: K. Handa <address@hidden>
branch nick: trunk
timestamp: Sun 2014-10-05 17:19:03 +0900
message:
coding.c (detect_coding_iso_2022): Set coding->rejected correctly when an
invalid escape sequence is found (Bug#18610).
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/coding.c coding.c-20091113204419-o5vbwnq5f7feedwu-1077
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-10-04 12:28:41 +0000
+++ b/src/ChangeLog 2014-10-05 08:17:15 +0000
@@ -1,3 +1,8 @@
+2014-10-05 K. Handa <address@hidden>
+
+ * coding.c (detect_coding_iso_2022): Set coding->rejected
+ correctly when an invalid escape sequence is found (Bug#18610).
+
2014-10-04 Jan Djärv <address@hidden>
* gtkutil.c (create_menus): Only add tearoffs to empty menus.
=== modified file 'src/coding.c'
--- a/src/coding.c 2014-10-03 04:35:10 +0000
+++ b/src/coding.c 2014-10-05 08:17:15 +0000
@@ -3073,8 +3073,13 @@
ONE_MORE_BYTE (c1);
if (c1 < ' ' || c1 >= 0x80
|| (id = iso_charset_table[0][c >= ','][c1]) < 0)
- /* Invalid designation sequence. Just ignore. */
- break;
+ {
+ /* Invalid designation sequence. Just ignore. */
+ if (c1 >= 0x80)
+ rejected |= (CATEGORY_MASK_ISO_7BIT
+ | CATEGORY_MASK_ISO_7_ELSE);
+ break;
+ }
}
else if (c == '$')
{
@@ -3088,16 +3093,29 @@
ONE_MORE_BYTE (c1);
if (c1 < ' ' || c1 >= 0x80
|| (id = iso_charset_table[1][c >= ','][c1]) < 0)
- /* Invalid designation sequence. Just ignore. */
- break;
+ {
+ /* Invalid designation sequence. Just ignore. */
+ if (c1 >= 0x80)
+ rejected |= (CATEGORY_MASK_ISO_7BIT
+ | CATEGORY_MASK_ISO_7_ELSE);
+ break;
+ }
}
else
- /* Invalid designation sequence. Just ignore it. */
- break;
+ {
+ /* Invalid designation sequence. Just ignore it. */
+ if (c >= 0x80)
+ rejected |= (CATEGORY_MASK_ISO_7BIT
+ | CATEGORY_MASK_ISO_7_ELSE);
+ break;
+ }
}
else
{
/* Invalid escape sequence. Just ignore it. */
+ if (c >= 0x80)
+ rejected |= (CATEGORY_MASK_ISO_7BIT
+ | CATEGORY_MASK_ISO_7_ELSE);
break;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r118046: coding.c (detect_coding_iso_2022): Set coding->rejected correctly when an invalid escape sequence is found (Bug#18610).,
Kenichi Handa <=