[vte] parser: Don't collect invalid characters in escape sequences
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] parser: Don't collect invalid characters in escape sequences
- Date: Tue, 27 Mar 2018 17:46:00 +0000 (UTC)
commit 887f744b6e8c84204fa9bd66167ada88a9e7293a
Author: Christian Persch <chpe src gnome org>
Date: Tue Mar 27 19:40:13 2018 +0200
parser: Don't collect invalid characters in escape sequences
Intermediates must be 2/0..2/15, and finals must be 3/0..7/14.
Characters outside of that range shouldn't be silently ignored,
but instead abort the sequence.
src/parser.cc | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/parser.cc b/src/parser.cc
index f90736a..0c3968f 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -1356,8 +1356,8 @@ static int parser_feed_to_state(struct vte_parser *parser, uint32_t raw)
ACTION_IGNORE);
}
- return parser_transition(parser, raw,
- STATE_ESC_INT, ACTION_COLLECT);
+ return parser_transition(parser, raw, STATE_GROUND,
+ ACTION_IGNORE);
case STATE_ESC_INT:
switch (raw) {
case 0x00 ... 0x1a: /* C0 \ { ESC } */
@@ -1378,8 +1378,8 @@ static int parser_feed_to_state(struct vte_parser *parser, uint32_t raw)
ACTION_IGNORE);
}
- return parser_transition(parser, raw,
- STATE_NONE, ACTION_COLLECT);
+ return parser_transition(parser, raw, STATE_GROUND,
+ ACTION_IGNORE);
case STATE_CSI_ENTRY:
switch (raw) {
case 0x00 ... 0x1a: /* C0 \ { ESC } */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]