From: Johan Hedberg <johan.hedberg@gmail.com>
To: Syam Sidhardhan <syamsidhardh@gmail.com>
Cc: Syam Sidhardhan <s.syam@samsung.com>, linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ 1/2] audio: Fix headset NULL pointer dereference during AT+BLDN response
Date: Tue, 13 Nov 2012 17:40:19 +0200 [thread overview]
Message-ID: <20121113154019.GA29811@x220> (raw)
In-Reply-To: <CAFBvHifFX-8vcQciLktVhUgjN7Z-QaQmST2Jbi=gKtz96iHLvg@mail.gmail.com>
Hi Syam,
On Fri, Nov 09, 2012, Syam Sidhardhan wrote:
> On Tue, Oct 23, 2012 at 7:27 PM, Syam Sidhardhan <s.syam@samsung.com> wrote:
> > While waiting for the AT+BLDN asynchronous response, if RFCOMM got
> > disconnected, then respose will cause NULL pointer dereference.
> >
> > During headset disconnection, the headset state changes from
> > HEADSET_STATE_CONNECTED to HEADSET_STATE_DISCONNECTED along with
> > freeing the dev->headset. During the response, in telephony_generic_rsp
> > its dereferencing.
> >
> > Log:
> > bluetoothd[5573]: audio/headset.c:handle_event() Received AT+BLDN
> > bluetoothd[5573]: audio/telephony.c:telephony_last_dialed_number_req()
> > telephony-tizen: last dialed number request
> > bluetoothd[5573]: audio/telephony.c:dbus_method_call_send() +
> > bluetoothd[5573]: audio/telephony.c:dbus_method_call_send() -
> > bluetoothd[5573]: Endpoint replied with an error: org.freedesktop.DBus\
> > .Error.NoReply
> > bluetoothd[5573]: audio/telephony.c:telephony_device_disconnected()
> > telephony-tizen: device 0x40439b60 disconnected
> > bluetoothd[5573]: audio/headset.c:headset_set_state() State changed
> > /org/bluez/5573/hci0/dev_BC_47_60_F5_88_89:
> > HEADSET_STATE_CONNECTED -> HEADSET_STATE_DISCONNECTED
> > bluetoothd[5573]: audio/media.c:headset_state_changed()
> > bluetoothd[5573]: audio/media.c:headset_state_changed() Clear endpoint
> > 0x40430620
> > bluetoothd[5573]: audio/telephony.c:telephony_dial_number_reply()
> > redial_reply
> > bluetoothd[5573]: audio/telephony.c:telephony_dial_number_reply()
> > dial_reply reply: No Call log
> > ---
> > audio/headset.c | 3 +++
> > 1 files changed, 3 insertions(+), 0 deletions(-)
> >
> > diff --git a/audio/headset.c b/audio/headset.c
> > index bd83a65..30d24cf 100644
> > --- a/audio/headset.c
> > +++ b/audio/headset.c
> > @@ -689,6 +689,9 @@ static int telephony_generic_rsp(struct audio_device *device, cme_error_t err)
> > struct headset *hs = device->headset;
> > struct headset_slc *slc = hs->slc;
> >
> > + if (!slc)
> > + return -EIO;
> > +
> > if ((err != CME_ERROR_NONE) && slc->cme_enabled)
> > return headset_send(hs, "\r\n+CME ERROR: %d\r\n", err);
> >
>
> ping.
This file doesn't exist in bluez.git anymore.
Johan
next prev parent reply other threads:[~2012-11-13 15:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-23 13:57 [PATCH BlueZ 1/2] audio: Fix headset NULL pointer dereference during AT+BLDN response Syam Sidhardhan
2012-10-23 13:57 ` [PATCH BlueZ 2/2] gdbus: Replace leading spaces with tabs Syam Sidhardhan
2012-11-16 8:07 ` Johan Hedberg
2012-11-09 3:32 ` [PATCH BlueZ 1/2] audio: Fix headset NULL pointer dereference during AT+BLDN response Syam Sidhardhan
2012-11-13 15:40 ` Johan Hedberg [this message]
2012-11-13 16:27 ` Syam Sidhardhan
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=20121113154019.GA29811@x220 \
--to=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=s.syam@samsung.com \
--cc=syamsidhardh@gmail.com \
/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).