diff options
author | Carlos Eduardo Gallo Filho <gcarlos@disroot.org> | 2024-09-10 21:15:28 -0300 |
---|---|---|
committer | Maxime Ripard <mripard@kernel.org> | 2024-09-11 14:17:07 +0200 |
commit | 80f48b7d77fc82b5f7b7f4ab14b4bbcb618c5e53 (patch) | |
tree | a053565a6554064eef76d9430125f4ee47755225 /drivers/gpu/drm/tests | |
parent | e2b5f1da5fb9c899468067d859e604ae922664b1 (diff) |
drm/tests: Replace strcpy to strscpy on drm_test_framebuffer_create test
Replace the use of strcpy to strscpy on the test_to_desc of the
drm_test_framebuffer_create test for better security and reliability.
Signed-off-by: Carlos Eduardo Gallo Filho <gcarlos@disroot.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240911001559.28284-4-gcarlos@disroot.org
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/tests')
-rw-r--r-- | drivers/gpu/drm/tests/drm_framebuffer_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tests/drm_framebuffer_test.c b/drivers/gpu/drm/tests/drm_framebuffer_test.c index 3ed987423322..4b1884be9d7a 100644 --- a/drivers/gpu/drm/tests/drm_framebuffer_test.c +++ b/drivers/gpu/drm/tests/drm_framebuffer_test.c @@ -409,7 +409,7 @@ static void drm_test_framebuffer_create(struct kunit *test) static void drm_framebuffer_test_to_desc(const struct drm_framebuffer_test *t, char *desc) { - strcpy(desc, t->name); + strscpy(desc, t->name, KUNIT_PARAM_DESC_SIZE); } KUNIT_ARRAY_PARAM(drm_framebuffer_create, drm_framebuffer_create_cases, |