fbdev: sisfb: Replace strlen() strcpy() pair with strscpy()

Use the result of strscpy() for the overflow check.

Signed-off-by: David Laight <david.laight.linux@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
David Laight 2026-06-06 21:27:41 +01:00 committed by Helge Deller
parent d1338aa2d6
commit 160b2ef00f

View File

@ -204,8 +204,7 @@ static void sisfb_search_mode(char *name, bool quiet)
return;
}
if(strlen(name) <= 19) {
strcpy(strbuf1, name);
if (strscpy(strbuf1, name) > 0) {
for(i = 0; i < strlen(strbuf1); i++) {
if(strbuf1[i] < '0' || strbuf1[i] > '9') strbuf1[i] = ' ';
}