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

Commit 82598587 authored by Mishra Mahima's avatar Mishra Mahima Committed by Krishna Manikandan
Browse files

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: default avatarHarsh Sahu <hsahu@codeaurora.org>
Signed-off-by: default avatarMishra Mahima <mahima@codeaurora.org>
parent 84b4ce53
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1086,7 +1086,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;