From: Marcel Holtmann <marcel@holtmann.org>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] null bytes in 'SDP_TEXT_STR8' data element
Date: Mon, 27 Jun 2005 07:50:18 +0200 [thread overview]
Message-ID: <1119851418.15397.4.camel@pegasus> (raw)
In-Reply-To: <001301c57a9b$69a0c2b0$fefda8c0@planetmunich.buci.de>
Hi Raimund,
> I have problems adding a "TEXT" attribute value to a service
> record that contains '0x00' bytes. First, it seems like the sdp_data_alloc()
> function does use strlen() for text entries which will use these
> bytes as string terminators.
>
> Second, I use the JSR-82 library from Avetana, where the service record
> gets registered via send_req_w4_rsp which seems to be null-byte safe.
> However, when someone queries the record, the string element is again
> truncated which seems to happen in the sdp_gen_pdu() function in
> sdp/sdp.c [of bluez-libs-2.17], l. 686, where strlen() is used to
> determine the string element's length. Would it be possible to use
> d->unitSize in this place instead?
it is fine to use unitSize. Send in a patch for both problems.
Regards
Marcel
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
prev parent reply other threads:[~2005-06-27 5:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-26 22:07 [Bluez-devel] null bytes in 'SDP_TEXT_STR8' data element Raimund Steger
2005-06-27 5:50 ` Marcel Holtmann [this message]
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=1119851418.15397.4.camel@pegasus \
--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