From 663e99501225e00269569b08ee37f20800283453 Mon Sep 17 00:00:00 2001 From: Harsh Sahu Date: Thu, 27 Apr 2017 15:27:43 -0700 Subject: [PATCH] msm: mdss: fix null pointer dereferencing Current driver checks if the address of start pointer is zero. But in cases when start pointer is NULL this check will result in null pointer dereferencing. This change adds an additioanl check on the start pointer to avoid null pointer dereferencing. CRs-fixed: 2035100 Change-Id: Ic86c9e73cd676cbf8680f5b7266ee3829f4ccbd2 Signed-off-by: Harsh Sahu --- drivers/video/fbdev/msm/mdss_mdp_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/msm/mdss_mdp_util.c b/drivers/video/fbdev/msm/mdss_mdp_util.c index d0bf61679f61..22656175edf8 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_util.c +++ b/drivers/video/fbdev/msm/mdss_mdp_util.c @@ -1095,7 +1095,7 @@ static int mdss_mdp_get_img(struct msmfb_data *img, return ret; } } - if (!*start) { + if (start && !*start) { pr_err("start address is zero!\n"); mdss_mdp_put_img(data, rotator, dir); return -ENOMEM;