summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorManoj Prabhu B <bmanoj@codeaurora.org>2016-10-06 10:10:13 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2016-10-06 21:33:47 -0700
commit702e512b92c03ea147d0180346d1a5ad7fb56743 (patch)
treedcf36fb9557bb6764c8f69d81d6aee8e1c71e001 /drivers/char
parente9a7b4841897c06e8fe78c70869d81874687a29b (diff)
diag: dci: Fix possible out of bound access
This patch fixes the possible out of bound access by accessing only dci supported peripheral feature. Bug: 31864832 CRs-Fixed: 1074901 Change-Id: I99b7feb4b9af8480912a0a3b3e9834f0ecd92189 Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/diag/diag_dci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/diag/diag_dci.c b/drivers/char/diag/diag_dci.c
index b830334dc701..f0cd6cf3967d 100644
--- a/drivers/char/diag/diag_dci.c
+++ b/drivers/char/diag/diag_dci.c
@@ -3066,8 +3066,8 @@ int diag_dci_write_proc(uint8_t peripheral, int pkt_type, char *buf, int len)
!(driver->feature[PERIPHERAL_MODEM].rcvd_feature_mask)) {
DIAG_LOG(DIAG_DEBUG_DCI,
"buf: 0x%pK, p: %d, len: %d, f_mask: %d\n",
- buf, peripheral, len,
- driver->feature[peripheral].rcvd_feature_mask);
+ buf, peripheral, len,
+ driver->feature[PERIPHERAL_MODEM].rcvd_feature_mask);
return -EINVAL;
}