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