From: Johan Hedberg <johan.hedberg@gmail.com>
To: Anderson Lizardo <anderson.lizardo@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH RFC] avdtp: Fix incorrect gchar buffer allocation
Date: Tue, 22 May 2012 12:59:58 +0300 [thread overview]
Message-ID: <20120522095958.GB12996@x220> (raw)
In-Reply-To: <1337348789-21109-1-git-send-email-anderson.lizardo@openbossa.org>
Hi Lizardo,
On Fri, May 18, 2012, Anderson Lizardo wrote:
> The code was allocating an array of gchar pointers, where an array of
> gchar is expected.
> ---
> audio/gstavdtpsink.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> I did not check the code at length, but looking at other functions, this is
> most likely a bug.
>
> diff --git a/audio/gstavdtpsink.c b/audio/gstavdtpsink.c
> index af04a56..b5dfae4 100644
> --- a/audio/gstavdtpsink.c
> +++ b/audio/gstavdtpsink.c
> @@ -1144,7 +1144,7 @@ static gboolean gst_avdtp_sink_update_caps(GstAvdtpSink *self)
>
> static gboolean gst_avdtp_sink_get_capabilities(GstAvdtpSink *self)
> {
> - gchar *buf[BT_SUGGESTED_BUFFER_SIZE];
> + gchar buf[BT_SUGGESTED_BUFFER_SIZE];
> struct bt_get_capabilities_req *req = (void *) buf;
> struct bt_get_capabilities_rsp *rsp = (void *) buf;
> int err;
Applied. Thanks.
Johan
prev parent reply other threads:[~2012-05-22 9:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-18 13:46 [PATCH RFC] avdtp: Fix incorrect gchar buffer allocation Anderson Lizardo
2012-05-22 9:59 ` Johan Hedberg [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=20120522095958.GB12996@x220 \
--to=johan.hedberg@gmail.com \
--cc=anderson.lizardo@openbossa.org \
--cc=linux-bluetooth@vger.kernel.org \
/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).