From 73a4385c6947df393ffb4bcdf84eef1294057d0c Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 25 Apr 2024 02:57:34 +0300 Subject: media: vimc: Constify vimc_ent_type structures The vimc_ent_type structure contains static pointers to functions, and no other information that need to be modified after initialization. Make them const to avoid the risk of arbitrary code execution following an overflow that would overwrite the structure's contents. Signed-off-by: Laurent Pinchart Signed-off-by: Shuah Khan Signed-off-by: Hans Verkuil --- drivers/media/test-drivers/vimc/vimc-capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/test-drivers/vimc/vimc-capture.c') diff --git a/drivers/media/test-drivers/vimc/vimc-capture.c b/drivers/media/test-drivers/vimc/vimc-capture.c index ba7550b8ba7e..89506ae00901 100644 --- a/drivers/media/test-drivers/vimc/vimc-capture.c +++ b/drivers/media/test-drivers/vimc/vimc-capture.c @@ -494,7 +494,7 @@ err_free_vcapture: return ERR_PTR(ret); } -struct vimc_ent_type vimc_capture_type = { +const struct vimc_ent_type vimc_capture_type = { .add = vimc_capture_add, .unregister = vimc_capture_unregister, .release = vimc_capture_release -- cgit