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:05 +01:00
2021-11-06 13:58:45 +01:00
2021-11-26 11:35:56 +01:00
2021-11-26 11:36:01 +01:00
2021-07-20 16:16:01 +02:00
2021-11-26 11:36:14 +01:00
2021-11-02 18:26:45 +01:00
2021-09-22 11:47:55 +02:00
2021-09-22 11:47:46 +02:00
2021-07-20 16:16:03 +02:00
2021-05-22 10:59:29 +02:00
2021-05-26 11:48:34 +02:00
2021-11-26 11:36:09 +01:00
2021-09-22 11:47:57 +02:00
2021-11-26 11:36:10 +01:00
2021-10-06 15:31:21 +02:00
2021-11-26 11:36:08 +01:00
2021-11-26 11:36:08 +01:00
2021-11-26 11:36:14 +01:00
2021-07-28 11:13:45 +02:00
2021-11-26 11:36:00 +01:00
2021-07-20 16:15:57 +02:00
2021-04-07 12:48:50 +02:00
2021-11-26 11:35:57 +01:00
2021-10-06 15:31:14 +02:00
2021-07-20 16:15:55 +02:00
2021-10-06 15:31:13 +02:00
2021-11-26 11:36:14 +01:00
2021-10-17 10:19:48 +02:00
2021-05-22 10:59:34 +02:00
2021-11-26 11:35:59 +01:00
2021-11-26 11:36:09 +01:00
2021-07-20 16:16:10 +02:00
2021-10-13 10:10:52 +02:00
2021-03-11 14:04:59 +01:00
2021-11-26 11:36:03 +01:00
2021-11-26 11:36:13 +01:00
2021-11-26 11:35:57 +01:00
2021-08-26 08:36:42 -04:00
2021-10-06 15:31:25 +02:00
2021-11-26 11:36:12 +01:00
2021-10-27 09:53:15 +02:00
2021-07-20 16:15:57 +02:00
2021-01-17 14:04:22 +01:00
2021-10-06 15:31:12 +02:00
2021-10-06 15:31:15 +02:00
2021-11-26 11:36:08 +01:00
2021-11-26 11:36:13 +01:00
2021-11-26 11:36:09 +01:00
2021-09-22 11:48:13 +02:00
2021-10-20 11:23:02 +02:00
2021-11-26 11:36:10 +01:00
2021-11-26 11:36:14 +01:00
2021-11-26 11:36:11 +01:00
2021-11-02 18:26:44 +01:00
2021-09-22 11:48:13 +02:00
2021-03-11 14:04:59 +01:00
2021-11-26 11:36:10 +01:00
2021-10-20 11:23:02 +02:00
2021-09-22 11:48:07 +02:00
2021-09-03 09:58:01 +02:00
2021-09-26 13:39:48 +02:00
2021-09-22 11:48:08 +02:00
2021-11-26 11:36:14 +01:00
2021-08-12 13:19:43 +02:00
2021-05-22 10:59:15 +02:00
2021-11-26 11:36:13 +01:00
2021-11-26 11:36:03 +01:00
2021-11-26 11:36:10 +01:00
2021-11-26 11:36:14 +01:00
2020-12-30 11:26:04 +01:00
2021-10-13 10:10:51 +02:00
2021-09-26 13:39:49 +02:00
2021-05-26 11:48:33 +02:00
2021-11-26 11:36:00 +01:00
2021-02-13 13:51:14 +01:00
2021-07-28 11:13:42 +02:00
2021-05-22 10:59:42 +02:00
2021-09-22 11:47:57 +02:00
2021-09-22 11:47:50 +02:00
2021-11-26 11:36:13 +01:00
2021-08-26 08:36:48 -04:00
2021-11-26 11:36:12 +01:00
2021-05-22 10:59:30 +02:00
2021-11-26 11:36:07 +01:00
2021-07-20 16:15:50 +02:00
2021-11-12 14:40:52 +01:00
2021-07-28 11:13:48 +02:00
2021-08-12 13:19:42 +02:00
2021-10-06 15:31:15 +02:00
2021-06-03 08:38:04 +02:00
2021-11-26 11:36:13 +01:00
2021-11-26 11:36:13 +01:00
2021-09-22 11:48:01 +02:00
2021-09-03 09:58:02 +02:00
2021-11-26 11:36:13 +01:00
2021-10-20 11:23:02 +02:00
2021-07-20 16:15:55 +02:00
2021-07-20 16:16:07 +02:00
2021-11-26 11:35:59 +01:00
2021-11-26 11:36:02 +01:00