Unverified Commit 6ff917ed authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!15419 NFC: nci: Add bounds checking in nci_hci_create_pipe()

parents b091a662 fd734e84
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -548,6 +548,8 @@ static u8 nci_hci_create_pipe(struct nci_dev *ndev, u8 dest_host,

	pr_debug("pipe created=%d\n", pipe);

	if (pipe >= NCI_HCI_MAX_PIPES)
		pipe = NCI_HCI_INVALID_PIPE;
	return pipe;
}