All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Loïc Lefort" <loic.lefort@ismart.fr>
To: bluez-devel@lists.sourceforge.net
Subject: [Bluez-devel] Re: DUN lookup on Samsung D500 raises SIGSEGV
Date: Fri, 30 Sep 2005 16:31:33 +0200	[thread overview]
Message-ID: <433D4C45.6080304@ismart.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 113 bytes --]

Hi Marcel,

here is the patch as an attachment.

Loïc

-- 
Loïc Lefort <loic.lefort@ismart.fr>
iSmart


[-- Attachment #2: samsung-patch --]
[-- Type: text/plain, Size: 1042 bytes --]

--- bluez-libs-2.19/src/sdp.c	2005-08-06 13:13:58.000000000 +0200
+++ bluez-libs-2.19-patched-for-d500/src/sdp.c	2005-09-29 13:46:38.000000000 +0200
@@ -1526,12 +1526,24 @@
 		return -1;
 	}
 	for (seq = sdpdata->val.dataseq; seq && seq->val.dataseq; seq = seq->next) {
-		sdp_data_t *uuid = seq->val.dataseq;
-		sdp_data_t *pVnum = seq->val.dataseq->next;
-		if (uuid && pVnum) {
+		uuid_t *uuid = NULL;
+		uint16_t version = 0x100;
+
+		if (SDP_IS_UUID(seq->dtd)) {
+			uuid = &seq->val.uuid;
+		} else {
+			sdp_data_t *puuid = seq->val.dataseq;
+			sdp_data_t *pVnum = seq->val.dataseq->next;
+			if (puuid && pVnum) {
+				uuid = &puuid->val.uuid;
+				version = pVnum->val.uint16;
+			}
+		}
+
+		if (uuid != NULL) {
 			profDesc = (sdp_profile_desc_t *)malloc(sizeof(sdp_profile_desc_t));
-			profDesc->uuid = uuid->val.uuid;
-			profDesc->version = pVnum->val.uint16;
+			profDesc->uuid = *uuid;
+			profDesc->version = version;
 #ifdef SDP_DEBUG
 			sdp_uuid_print(&profDesc->uuid);
 			SDPDBG("Vnum : 0x%04x\n", profDesc->version);

             reply	other threads:[~2005-09-30 14:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-30 14:31 Loïc Lefort [this message]
2005-09-30 14:44 ` [Bluez-devel] Re: DUN lookup on Samsung D500 raises SIGSEGV Marcel Holtmann
  -- strict thread matches above, loose matches on Subject: below --
2005-09-30 10:42 Loïc Lefort
2005-09-30 12:08 ` Marcel Holtmann

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=433D4C45.6080304@ismart.fr \
    --to=loic.lefort@ismart.fr \
    --cc=bluez-devel@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.