Files
linux/drivers
Geert Uytterhoeven 3d887dc577 auxdisplay: img-ascii-lcd: Fix lock-up when displaying empty string
[ Upstream commit afcb5a811f ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-26 11:36:14 +01:00
..
2021-11-26 11:36:01 +01:00
2021-07-20 16:15:55 +02:00
2021-11-26 11:35:59 +01:00
2021-01-17 14:04:22 +01:00
2020-12-30 11:26:04 +01:00