* [Bluez-devel] possible minor bug in l2cap.c
@ 2006-01-12 16:16 Martin Röhricht
2006-01-27 9:26 ` Martin Röhricht
0 siblings, 1 reply; 2+ messages in thread
From: Martin Röhricht @ 2006-01-12 16:16 UTC (permalink / raw)
To: bluez-devel
Hello together,
I was wondering if there is an uninitialised variable in use:
In function l2cap_config_req() we declare =C2=BBu8 rsp[64];=C2=AB and call =
it only
twice:
l2cap_send_cmd(conn, cmd->ident, L2CAP_CONF_RSP,
l2cap_build_conf_rsp(sk, rsp, NULL), rsp);
l2cap_send_cmd(conn, cmd->ident, L2CAP_CONF_RSP,
l2cap_build_conf_rsp(sk, rsp, &result), rsp);
In l2cap_build_conf_rsp() (rsp changed its name to data) we access it
like that:
struct l2cap_conf_rsp *rsp =3D data;
void *ptr =3D rsp->data;
I think whatever is going to be in ptr is from now on undefined, right?
But maybe I'm just wrong and someone could help me out?!
Martin
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Bluez-devel] possible minor bug in l2cap.c
2006-01-12 16:16 [Bluez-devel] possible minor bug in l2cap.c Martin Röhricht
@ 2006-01-27 9:26 ` Martin Röhricht
0 siblings, 0 replies; 2+ messages in thread
From: Martin Röhricht @ 2006-01-27 9:26 UTC (permalink / raw)
To: bluez-devel
Am Donnerstag, den 12.01.2006, 17:16 +0100 schrieb Martin R=C3=B6hricht:
> Hello together,
>=20
> I was wondering if there is an uninitialised variable in use:
> In function l2cap_config_req() we declare =C2=BBu8 rsp[64];=C2=AB and cal=
l it only
> twice:
> l2cap_send_cmd(conn, cmd->ident, L2CAP_CONF_RSP,
> l2cap_build_conf_rsp(sk, rsp, NULL), rsp);
> l2cap_send_cmd(conn, cmd->ident, L2CAP_CONF_RSP,
> l2cap_build_conf_rsp(sk, rsp, &result), rsp);
>=20
> In l2cap_build_conf_rsp() (rsp changed its name to data) we access it
> like that:
> struct l2cap_conf_rsp *rsp =3D data;
> void *ptr =3D rsp->data;
>=20
> I think whatever is going to be in ptr is from now on undefined, right?
> But maybe I'm just wrong and someone could help me out?!
I was wrong -- ptr is set some lines later. Everything should be fine
with it so far.
Martin
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-01-27 9:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-12 16:16 [Bluez-devel] possible minor bug in l2cap.c Martin Röhricht
2006-01-27 9:26 ` Martin Röhricht
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).