From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] bug in sdp_gen_pd
Date: Wed, 07 Jun 2006 23:10:50 +0200 [thread overview]
Message-ID: <1149714650.22472.62.camel@localhost> (raw)
In-Reply-To: <564d96fb0606060325q834360bqe4e9d41cbb28a16f@mail.gmail.com>
Hi Rafael,
> In sdp_gen_pd when handling SDP_TEXT_STR{8,16,32}, data_size is assumed to be
> "d->unitSize - sizeof(uint8_t)". This is false.
>
> In sdp_data_alloc_with_length, d->unitSize is defined to be
> sizeof(unit8_t) + length + sizeof(uint8_t) if length <= UCHAR_MAX
> or
> sizeof(unit8_t) + length + sizeof(uint16_t) if length > UCHAR_MAX
>
> The attached patch fixes sdp_gen_pdu to correctly compute data_size.
first you forgot the patch and second, are you sure. The SDP code is
actually messy and some stuff is in there that actually works, but is
not quite obvious. Can you provide a simple test program?
> Another strange thing in sdp_data_alloc_with_length: after adjusting
> unitSize, the dtd variable is changed from SDP_*_STR8 to SDP_*_STR16
> or the other way around. But this code is dead, since the dtd variable
> is no longer used in this function.
Never looked at it actually, but you might be right. However again,
there might be a really strange reason for it.
Regards
Marcel
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next prev parent reply other threads:[~2006-06-07 21:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-06 10:25 [Bluez-devel] bug in sdp_gen_pd Rafael Espíndola
2006-06-07 21:10 ` Marcel Holtmann [this message]
2006-06-07 21:59 ` Rafael Espíndola
2006-06-07 22:11 ` Marcel Holtmann
2006-06-08 17:07 ` Rafael Espíndola
2006-06-09 20:14 ` Marcel Holtmann
2006-06-12 8:01 ` Marcel Holtmann
2006-06-12 11:52 ` Rafael Espíndola
2006-06-19 11:07 ` Marcel Holtmann
2006-06-19 12:13 ` Rafael Espíndola
2006-06-19 12:17 ` Rafael Espíndola
2006-06-19 17:38 ` Rafael Espíndola
2006-06-19 18:07 ` Marcel Holtmann
2006-06-19 20:21 ` Rafael Espíndola
2006-06-20 7:17 ` Marcel Holtmann
2006-06-26 12:49 ` Marcel Holtmann
-- strict thread matches above, loose matches on Subject: below --
2006-06-06 14:14 Rafael Espíndola
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=1149714650.22472.62.camel@localhost \
--to=marcel@holtmann.org \
--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 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).