[PATCH v1] obex: Add null check for data pointer for PCE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Incase of legacy server, when the 'supported fetures bit' attribute
is NULL, Add the check to avoid any invalid memory access.

---
 obexd/client/pbap.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/obexd/client/pbap.c b/obexd/client/pbap.c
index 09d3fd425..48a2de650 100644
--- a/obexd/client/pbap.c
+++ b/obexd/client/pbap.c
@@ -1235,6 +1235,9 @@ static void *pbap_supported_features(struct obc_session *session)
 	data = obc_session_get_attribute(session,
 					SDP_ATTR_PBAP_SUPPORTED_FEATURES);
 
+	if (!data)
+		return NULL;
+
 	features = *(uint32_t *) data;
 	if (!features)
 		return NULL;
-- 
2.34.1





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux