linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: DoHyun Pyun <dh79.pyun@samsung.com>
To: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH obexd] pbap: Fix NULL check rutine
Date: Tue, 20 Dec 2011 17:29:27 +0900	[thread overview]
Message-ID: <4EF04767.3040306@samsung.com> (raw)
In-Reply-To: <1324366024-19523-1-git-send-email-dh79.pyun@samsung.com>

Hi, All

2011/12/20 16:27, DoHyun Pyun wrote:
> If obj->buffer is NULL, we should exit the function.
> Because the crash will be occured in string_read() function.
>
> THe previous statement returns the error when both obj->buffer and obj->aparams is NULL.
> ---
>   plugins/pbap.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/plugins/pbap.c b/plugins/pbap.c
> index 0f07c46..e642599 100644
> --- a/plugins/pbap.c
> +++ b/plugins/pbap.c
> @@ -996,7 +996,7 @@ static ssize_t vobject_pull_read(void *object, void *buf, size_t count)
>   	DBG("buffer %p maxlistcount %d", obj->buffer,
>   						pbap->params->maxlistcount);
>
> -	if (!obj->buffer&&  !obj->aparams)
> +	if (!obj->buffer || !obj->aparams)
>   		return -EAGAIN;
>
>   	if (pbap->params->maxlistcount == 0)

I found some problems in this patch, and I will re-write the patch.
So please ignore this patch.

Thanks,
Pyun

      reply	other threads:[~2011-12-20  8:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-20  7:27 [PATCH obexd] pbap: Fix NULL check rutine DoHyun Pyun
2011-12-20  8:29 ` DoHyun Pyun [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=4EF04767.3040306@samsung.com \
    --to=dh79.pyun@samsung.com \
    --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).