* [PATCH RFC] avdtp: Fix incorrect gchar buffer allocation
@ 2012-05-18 13:46 Anderson Lizardo
2012-05-22 9:59 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Anderson Lizardo @ 2012-05-18 13:46 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Anderson Lizardo
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;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH RFC] avdtp: Fix incorrect gchar buffer allocation
2012-05-18 13:46 [PATCH RFC] avdtp: Fix incorrect gchar buffer allocation Anderson Lizardo
@ 2012-05-22 9:59 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2012-05-22 9:59 UTC (permalink / raw)
To: Anderson Lizardo; +Cc: linux-bluetooth
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-22 9:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-18 13:46 [PATCH RFC] avdtp: Fix incorrect gchar buffer allocation Anderson Lizardo
2012-05-22 9:59 ` Johan Hedberg
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).