DivestOS/Patches/Linux_CVEs/CVE-2014-9885/ANY/0.patch
2017-10-29 22:14:37 -04:00

31 lines
1.1 KiB
Diff

From a1d5a4cbd5aa8656bc23b40c7cc43941e10f89c3 Mon Sep 17 00:00:00 2001
From: Dipen Parmar <dipenp@codeaurora.org>
Date: Fri, 18 Oct 2013 15:53:36 +0530
Subject: thermal: qpnp-adc-tm: Fix format specifier in snprintf
Add format specifier in snprintf to avoid security
vulnerability issues.
Change-Id: I6ea67633348341267e0646912a6b428709410c78
Signed-off-by: Dipen Parmar <dipenp@codeaurora.org>
---
drivers/thermal/qpnp-adc-tm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/qpnp-adc-tm.c b/drivers/thermal/qpnp-adc-tm.c
index a90a042..b203ae3 100644
--- a/drivers/thermal/qpnp-adc-tm.c
+++ b/drivers/thermal/qpnp-adc-tm.c
@@ -1886,7 +1886,7 @@ static int qpnp_adc_tm_probe(struct spmi_device *spmi)
pr_debug("thermal node%x\n", btm_channel_num);
chip->sensor[sen_idx].mode = THERMAL_DEVICE_DISABLED;
chip->sensor[sen_idx].thermal_node = true;
- snprintf(name, sizeof(name),
+ snprintf(name, sizeof(name), "%s",
chip->adc->adc_channels[sen_idx].name);
chip->sensor[sen_idx].meas_interval =
QPNP_ADC_TM_MEAS_INTERVAL;
--
cgit v1.1