linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Frédéric Dalleau" <frederic.dalleau@linux.intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: "Frédéric Dalleau" <frederic.dalleau@linux.intel.com>
Subject: [PATCH 2/2] sdp: Fix sdp_get_profile_descs for Mac Os X Lion
Date: Mon, 20 Feb 2012 21:57:58 +0100	[thread overview]
Message-ID: <1329771478-3935-3-git-send-email-frederic.dalleau@linux.intel.com> (raw)
In-Reply-To: <1329771478-3935-1-git-send-email-frederic.dalleau@linux.intel.com>

---
 lib/sdp.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/lib/sdp.c b/lib/sdp.c
index 57f630a..97c0a08 100644
--- a/lib/sdp.c
+++ b/lib/sdp.c
@@ -2064,7 +2064,12 @@ int sdp_get_profile_descs(const sdp_record_t *rec, sdp_list_t **profDescSeq)
 		uint16_t version = 0x100;
 
 		if (SDP_IS_UUID(seq->dtd)) {
+			sdp_data_t *next = seq->next;
 			uuid = &seq->val.uuid;
+			if (next && next->dtd == SDP_UINT16) {
+				version = next->val.uint16;
+				seq = next;
+			}
 		} else if (SDP_IS_SEQ(seq->dtd)) {
 			sdp_data_t *puuid = seq->val.dataseq;
 			sdp_data_t *pVnum = seq->val.dataseq->next;
-- 
1.7.5.4


  parent reply	other threads:[~2012-02-20 20:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-20 20:57 [PATCH 0/2] Fix crash in profile descriptor list parsing Frédéric Dalleau
2012-02-20 20:57 ` [PATCH 1/2] sdp: Check type of sdp data before dereferencing Frédéric Dalleau
2012-02-20 20:57 ` Frédéric Dalleau [this message]
2012-03-13 14:20   ` [PATCH 2/2] sdp: Fix sdp_get_profile_descs for Mac Os X Lion Johan Hedberg
2012-03-14 15:11     ` Dalleau, Frederic
2012-03-08 10:11 ` [PATCH 0/2] Fix crash in profile descriptor list parsing Dalleau, Frederic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1329771478-3935-3-git-send-email-frederic.dalleau@linux.intel.com \
    --to=frederic.dalleau@linux.intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).