DivestOS/Patches/Linux_CVEs/CVE-2016-10293/ANY/1.patch
2017-10-29 22:14:37 -04:00

14 lines
413 B
Diff

diff --git a/drivers/video/msm/mdss/mdss_debug.c b/drivers/video/msm/mdss/mdss_debug.c
index feb73bc..759ed14 100644
--- a/drivers/video/msm/mdss/mdss_debug.c
+++ b/drivers/video/msm/mdss/mdss_debug.c
@@ -170,6 +170,8 @@
p[2] = 0;
pr_debug("p[%d] = %pK:%s\n", i, p, p);
cnt = sscanf(p, "%x", &tmp);
+ if (cnt != 1)
+ return -EFAULT;
reg[i] = tmp;
pr_debug("reg[%d] = %x\n", i, (int)reg[i]);
}