ng_hci: handle NG_HCI_M_PULLUP failure in le_advertizing_report

PR:		267396
Reported by:	Robert Morris <rtm@lcs.mit.edu>
Reviewed by:	takawata
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37228
This commit is contained in:
Ed Maste 2022-11-01 09:55:22 -04:00
parent f0f3e3e961
commit 05c0c99ea3

View File

@ -399,6 +399,10 @@ le_advertizing_report(ng_hci_unit_p unit, struct mbuf *event)
/* Get remote unit address */
NG_HCI_M_PULLUP(event, sizeof(u_int8_t));
if (event == NULL) {
error = ENOBUFS;
goto out;
}
addr_type = *mtod(event, u_int8_t *);
m_adj(event, sizeof(u_int8_t));