linux-stable/drivers/auxdisplay
Geert Uytterhoeven afcb5a811f auxdisplay: img-ascii-lcd: Fix lock-up when displaying empty string
While writing an empty string to a device attribute is a no-op, and thus
does not need explicit safeguards, the user can still write a single
newline to an attribute file:

    echo > .../message

If that happens, img_ascii_lcd_display() trims the newline, yielding an
empty string, and causing an infinite loop in img_ascii_lcd_scroll().

Fix this by adding a check for empty strings.  Clear the display in case
one is encountered.

Fixes: 0cad855fbd ("auxdisplay: img-ascii-lcd: driver for simple ASCII LCD displays")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2021-10-21 23:36:28 +02:00
..
arm-charlcd.c auxdisplay: Replace HTTP links with HTTPS ones 2020-08-08 16:10:03 +02:00
cfag12864b.c auxdisplay: Replace symbolic permissions with octal permissions 2021-07-16 07:42:35 +02:00
cfag12864bfb.c treewide: Miguel has moved 2021-02-26 09:41:03 -08:00
charlcd.c auxdisplay: charlcd: Drop unneeded initializers and switch to C99 style 2021-07-16 07:42:35 +02:00
charlcd.h auxdisplay: Change gotoxy calling interface 2020-11-04 11:04:04 +01:00
hd44780_common.c auxdisplay: Change gotoxy calling interface 2020-11-04 11:04:04 +01:00
hd44780_common.h auxdisplay: Change gotoxy calling interface 2020-11-04 11:04:04 +01:00
hd44780.c auxdisplay: hd44780: Fix oops on module unloading 2021-07-16 07:42:27 +02:00
ht16k33.c auxdisplay: ht16k33: Fix refresh rate handling 2021-01-25 22:14:19 +01:00
img-ascii-lcd.c auxdisplay: img-ascii-lcd: Fix lock-up when displaying empty string 2021-10-21 23:36:28 +02:00
Kconfig auxdisplay: Fix duplicate CHARLCD config symbol 2021-01-25 22:14:19 +01:00
ks0108.c auxdisplay: Replace symbolic permissions with octal permissions 2021-07-16 07:42:35 +02:00
lcd2s.c auxdisplay: fix platform_no_drv_owner.cocci warnings 2020-11-14 09:52:35 +01:00
Makefile auxdisplay: add a driver for lcd2s character display 2020-11-04 11:04:05 +01:00
panel.c treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00