projects/linux·commit 38c0ecf6

Merge tag 'auxdisplay-for-linus-v4.20' of https://github.com/ojeda/linux

38c0ecf6 · Linus Torvalds <[email protected]> · 2018-12-22 14:25:23 -08:00

Pull auxdisplay fix from Miguel Ojeda:
 "charlcd: fix x/y command parsing (Mans Rullgard)"

* tag 'auxdisplay-for-linus-v4.20' of https://github.com/ojeda/linux:
  auxdisplay: charlcd: fix x/y command parsing
Commit
38c0ecf6087a8cb2af24ddd2124e9ca3c666dcdf
Parents
94f82008 · 9bc30ab8

Merge commit. Changes below are compared with the first parent: 94f82008.

Changes

1 files changed · +3 −0

FileStatusAddDelContent
drivers/auxdisplay/charlcd.cmodified+3−0View file

drivers/auxdisplay/charlcd.c

View file
diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c
index 81c22d2..60e0b77 100644
--- a/drivers/auxdisplay/charlcd.c
+++ b/drivers/auxdisplay/charlcd.c
@@ -538,6 +538,9 @@ static inline int handle_lcd_special_code(struct charlcd *lcd)
}
case 'x': /* gotoxy : LxXXX[yYYY]; */
case 'y': /* gotoxy : LyYYY[xXXX]; */
+ if (priv->esc_seq.buf[priv->esc_seq.len - 1] != ';')
+ break;
+
/* If the command is valid, move to the new address */
if (parse_xy(esc, &priv->addr.x, &priv->addr.y))
charlcd_gotoxy(lcd);