Skip to contentSkip to conversation

I've found a bug in sdp_cstate_get() function.

Bluez-devel 이주영 3 participants 6 messages Mar 19, 2008 – Mar 20, 2008 Bluetooth drivers

lore
Share & tools
lore

이주영

author
#0 lore raw

Hi,

I've found a bug in sdp_cstate_get() function. (bluez-utils/dist/sdpd/request.c)
-> memcpy(cstate, (sdp_cont_state_t *)pdata, sizeof(sdp_cont_state_t));
When running this code, "hcid daemon crash" occurred.(memory alignment error) I think there's a bug with (sdp_cont_state_t *)pdata in sdp_cstate_get() function. I fixed this code.
-> memcpy(cstate, pdata, sizeof(sdp_cont_state_t));
Now, hcid daemon doesn't die.

tkakel님의 블로그
안녕하세요.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#1 lore raw

Hi,

Quoted 7 lines

I've found a bug in sdp_cstate_get() function. (bluez-utils/dist/sdpd/request.c)
-> memcpy(cstate, (sdp_cont_state_t *)pdata,
sizeof(sdp_cont_state_t));
When running this code, "hcid daemon crash" occurred.(memory alignment error)

Quoted 6 lines

I think there's a bug with (sdp_cont_state_t *)pdata in sdp_cstate_get() function.
I fixed this code.
-> memcpy(cstate, pdata, sizeof(sdp_cont_state_t));
Now, hcid daemon doesn't die.

which version? This should have been fixed by now. Either in the latest bluez-utils-3.28 or the CVS.

Regards

Marcel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

author
#2 lore raw

Hi,

The version is latest bluez-utils-3.28.

Thanks.

Regards
jooyoung.

-----Original Message-----
From: "Marcel Holtmann"<[email protected]>
To: "이주영"<[email protected]>; "BlueZ development"<[email protected]> Cc:
Sent: 08-03-20(목) 01:47:11
Subject: Re: [Bluez-devel] I've found a bug in sdp_cstate_get() function.
Hi,

Quoted 7 lines

I've found a bug in sdp_cstate_get() function. (bluez-utils/dist/sdpd/request.c)
-> memcpy(cstate, (sdp_cont_state_t *)pdata, sizeof(sdp_cont_state_t));
When running this code, "hcid daemon crash" occurred.(memory alignment error)

Quoted 6 lines

I think there's a bug with (sdp_cont_state_t *)pdata in sdp_cstate_get() function.
I fixed this code.
-> memcpy(cstate, pdata, sizeof(sdp_cont_state_t)); Now, hcid daemon doesn't die.

which version? This should have been fixed by now. Either in the latest bluez-utils-3.28 or the CVS.
Regards
Marcel

tkakel님의 블로그
안녕하세요.

maintainer
#3 lore raw

Hi,

Quoted 3 lines

The version is latest bluez-utils-3.28.

we fixed it in the CVS. So that should be taken care of when we release bluez-utils-3.29.

Regards

Marcel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#4 lore raw

[Bluez-devel] RFCOMM sockets

In reply to Marcel Holtmann

Hi all,
I have 3 embedded devices with temperature sensor. This devices are accessed from a pc with linux reading data with rfcomm socket, isn't need to make sdp query for channel because rfcomm channels are statically assigned (it's lab equipment).

I need to read the 3 devices almost at same time and I've done a little C application using GLib IOChannels and non-blocking socket to read data from the devices. All works fine but if a device it's off the connection to the others it's slow, my impression is it waits timeout from the first device.
I can understand why if I have 3 rfcomm connections issued in non-blocking way these influences each other.

I'm using BlueZ 3.22 on a debian 4.0 whith kernel version 2.6.22

Thanks

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#5 lore raw

Re: [Bluez-devel] RFCOMM sockets

Hi Fabrizio,

Quoted 5 lines

I have 3 embedded devices with temperature sensor. This devices are accessed from a pc with linux reading data with rfcomm socket, isn't need to make sdp query for channel because rfcomm channels are statically assigned (it's lab equipment).

Quoted 8 lines

I need to read the 3 devices almost at same time and I've done a little
C application using GLib IOChannels and non-blocking socket to read data from the devices. All works fine but if a device it's off the connection to the others it's slow, my impression is it waits timeout from the first device.
I can understand why if I have 3 rfcomm connections issued in non-blocking way these influences each other.

because if you have to open ACL baseband connections, then it takes time. Especially when they fail. The baseband connections can not be done in parallel when it is the same host controller. You can use hciconfig to change the page timeout.

Regards

Marcel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel