DivestOS/Patches/Linux_CVEs-New/CVE-2017-8240/ANY/0.patch
2017-10-29 14:23:02 -04:00

32 lines
1.1 KiB
Diff

From 22b8b6608174c1308208d5bc6c143f4998744547 Mon Sep 17 00:00:00 2001
From: Patrick Daly <pdaly@codeaurora.org>
Date: Mon, 18 May 2015 14:52:47 -0700
Subject: pinctrl: qcom: Fix bug in iteration through functions
Fix iteration beyond array bounds when looping through
the pin functions
Change-Id: I7e88eed814364062fd93daf03f24ccd4baabf125
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
---
drivers/pinctrl/qcom/pinctrl-msm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
index e0f86fb..cbea28c 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm.c
@@ -895,7 +895,7 @@ static void msm_pinctrl_setup_pm_reset(struct msm_pinctrl *pctrl)
int i = 0;
const struct msm_function *func = pctrl->soc->functions;
- for (; i <= pctrl->soc->nfunctions; i++)
+ for (; i < pctrl->soc->nfunctions; i++)
if (!strcmp(func[i].name, "ps_hold")) {
pctrl->restart_nb.notifier_call = msm_ps_hold_restart;
pctrl->restart_nb.priority = 128;
--
cgit v1.1