Skip to content

Commit

Permalink
drm/msm/dsi: correct DSI id bounds check during registration
Browse files Browse the repository at this point in the history
Check DSI instance id argument against the proper boundary size
to protect against invalid configuration of the DSI id.

Signed-off-by: Lloyd Atkinson <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
  • Loading branch information
Lloyd Atkinson authored and robclark committed Feb 20, 2018
1 parent f0efc83 commit 6e1787c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/msm/dsi/dsi_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ int msm_dsi_manager_register(struct msm_dsi *msm_dsi)
int id = msm_dsi->id;
int ret;

if (id > DSI_MAX) {
if (id >= DSI_MAX) {
pr_err("%s: invalid id %d\n", __func__, id);
return -EINVAL;
}
Expand Down

0 comments on commit 6e1787c

Please sign in to comment.