src/adapter: Add the NULL check for response
A message that is not in the archive (sent off-list or not yet received): CGME20170327011830epcas5p448d6a1d19f613c5962d386546fe9ecf5@epcas5p4.samsung.com
PATCH 1/1 src/adapter: Add the NULL check for response
From: Lee Hyuk <[email protected]>
It is just bug fix.
Please review this.
Lee Hyuk (1):
src/adapter: Add the NULL check for response
src/adapter.c | 3 +++ 1 file changed, 3 insertions(+)
Signature · 1 line
1.9.1
PATCH 1/1 src/adapter: Add the NULL check for response
From: Lee Hyuk <[email protected]>
The response can be NULL pointer. It should be checked.
--- src/adapter.c | 3 +++ 1 file changed, 3 insertions(+)
src/adapter.c +3 -0
@@ -1227,6 +1227,9 @@ static void passive_scanning_complete(uint8_t status, uint16_t length,struct btd_adapter *adapter = user_data;const struct mgmt_cp_start_discovery *rp = param; +if (!rp) +return ; +DBG ("status 0x%02x" , status);if (length <sizeof (*rp)) {
Signature · 1 line
1.9.1
Luiz Augusto von Dentz
maintainerHi,
Quoted 22 lines · On Mon, Mar 27, 2017 at 4:18 AM, <[email protected]> wrote:
From: Lee Hyuk <[email protected]>
The response can be NULL pointer. It should be checked.
--- src/adapter.c | 3 +++ 1 file changed, 3 insertions(+)src/adapter.c +3
-1@@ -1227,6 +1227,9 @@ static void passive_scanning_complete(uint8_t status, uint16_t length,struct btd_adapter *adapter = user_data;const struct mgmt_cp_start_discovery *rp = param; +if (!rp) +return ; +DBG ("status 0x%02x" , status);if (length <sizeof (*rp)) { --
Quoted 1 line
1.9.1
It looks like you might have a broken kernel in this regard since Start Discovery shall always return the parameters given and in case it doesn't it is probably a nice thing to log an error.
Signature · 1 line
Luiz Augusto von Dentz