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>
This commit is contained in:
parent
e9a7b48418
commit
702e512b92
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue