diff options
| author | Carlos Eduardo Gallo Filho <[email protected]> | 2024-09-11 00:15:28 +0000 |
|---|---|---|
| committer | Maxime Ripard <[email protected]> | 2024-09-11 12:17:07 +0000 |
| commit | 80f48b7d77fc82b5f7b7f4ab14b4bbcb618c5e53 (patch) | |
| tree | a053565a6554064eef76d9430125f4ee47755225 /drivers/gpu/drm/tests/drm_framebuffer_test.c | |
| parent | drm/tests: Add parameters to the drm_test_framebuffer_create test (diff) | |
| download | kernel-80f48b7d77fc82b5f7b7f4ab14b4bbcb618c5e53.tar.gz kernel-80f48b7d77fc82b5f7b7f4ab14b4bbcb618c5e53.zip | |
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 <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Maxime Ripard <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/tests/drm_framebuffer_test.c')
| -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, |
