Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e86d8ae1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mdss: mdp3: Validate input from userspace"

parents bec65820 b5bb13e1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1218,7 +1218,8 @@ static int mdp3_ctrl_lut_update(struct msm_fb_data_type *mfd,
	if (!mdp3_session->dma->config_lut)
		return -EINVAL;

	if (cmap->start + cmap->len > MDP_LUT_SIZE) {
	if (cmap->start > MDP_LUT_SIZE || cmap->len > MDP_LUT_SIZE ||
			(cmap->start + cmap->len > MDP_LUT_SIZE)) {
		pr_err("mdp3_ctrl_lut_update invalid arguments\n");
		return  -EINVAL;
	}