From 1282ed28f07d7b7a03df74c6c9a61964683b61e5 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 15 May 2012 19:16:46 +0300 Subject: [PATCH] obexd: Fix not checking if GoepL2capPsm contains a valid PSM In case the PSM is not valid ignore it so we are still able to connect to RFCOMM. --- obexd/client/bluetooth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/obexd/client/bluetooth.c b/obexd/client/bluetooth.c index b49a82e28..56f80feac 100644 --- a/obexd/client/bluetooth.c +++ b/obexd/client/bluetooth.c @@ -261,7 +261,8 @@ static void search_callback(uint8_t type, uint16_t status, } data = sdp_data_get(rec, 0x0200); - if (data != NULL) + /* PSM must be odd and lsb of upper byte must be 0 */ + if (data != NULL && (data->val.uint16 & 0x0101) == 0x0001) ch = data->val.uint16; sdp_record_free(rec); -- 2.47.3