diff options
author | Andy Shevchenko <andy.shevchenko@gmail.com> | 2024-06-02 11:58:00 +0300 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2024-06-03 11:12:38 +0200 |
commit | 55624db051c8bdd39acbb1f35774c3f7b97c07b8 (patch) | |
tree | 06e48f8bd589caf3f4d257bfb0cebda5744a2cd5 /drivers/platform/x86/touchscreen_dmi.c | |
parent | 84b26f509c1b9c8b3c3c63d75912701f151fd148 (diff) | |
download | lwn-55624db051c8bdd39acbb1f35774c3f7b97c07b8.tar.gz lwn-55624db051c8bdd39acbb1f35774c3f7b97c07b8.zip |
platform/x86: touchscreen_dmi: Use 2-argument strscpy()
Use 2-argument strscpy(), which is not only shorter but also provides
an additional check that destination buffer is an array.
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20240602090244.1666360-8-andy.shevchenko@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/x86/touchscreen_dmi.c')
-rw-r--r-- | drivers/platform/x86/touchscreen_dmi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c index 3f626584f2c3..f74af0a689f2 100644 --- a/drivers/platform/x86/touchscreen_dmi.c +++ b/drivers/platform/x86/touchscreen_dmi.c @@ -1850,7 +1850,7 @@ static int __init ts_parse_props(char *str) u32 u32val; int i, ret; - strscpy(orig_str, str, sizeof(orig_str)); + strscpy(orig_str, str); /* * str is part of the static_command_line from init/main.c and poking |