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 <laurent.pinchart@ideasonboard.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
Laurent Pinchart
2024-04-25 02:57:34 +03:00
committed by Hans Verkuil
parent 2ef9a1e722
commit 73a4385c69
6 changed files with 11 additions and 11 deletions

View File

@@ -442,7 +442,7 @@ static struct vimc_ent_device *vimc_scaler_add(struct vimc_device *vimc,
return &vscaler->ved;
}
struct vimc_ent_type vimc_scaler_type = {
const struct vimc_ent_type vimc_scaler_type = {
.add = vimc_scaler_add,
.release = vimc_scaler_release
};