Linux bluetooth development
 help / color / mirror / Atom feed
From: "Raimund Steger" <rs@mytum.de>
To: <bluez-devel@lists.sourceforge.net>
Subject: [Bluez-devel] null bytes in 'SDP_TEXT_STR8' data element
Date: Mon, 27 Jun 2005 00:07:15 +0200	[thread overview]
Message-ID: <001301c57a9b$69a0c2b0$fefda8c0@planetmunich.buci.de> (raw)

Hi,

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?

Thanks,

Raimund



-- 
R.Steger  ICQ# 16845346  Tel  +49-179-2981632



-------------------------------------------------------
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

             reply	other threads:[~2005-06-26 22:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-26 22:07 Raimund Steger [this message]
2005-06-27  5:50 ` [Bluez-devel] null bytes in 'SDP_TEXT_STR8' data element 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='001301c57a9b$69a0c2b0$fefda8c0@planetmunich.buci.de' \
    --to=rs@mytum.de \
    --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