From: Johan Hedberg <johan.hedberg@gmail.com>
To: marcandre.lureau@gmail.com
Cc: linux-bluetooth@vger.kernel.org,
"Marc-André Lureau" <marc-andre.lureau@nokia.com>
Subject: Re: [PATCH] sbc: don't dereference sbc pointer if NULL
Date: Tue, 17 Feb 2009 23:59:06 +0200 [thread overview]
Message-ID: <20090217215906.GB10933@jh-x301> (raw)
In-Reply-To: <1234903601-7124-1-git-send-email-marcandre.lureau@gmail.com>
On Tue, Feb 17, 2009, marcandre.lureau@gmail.com wrote:
> diff --git a/sbc/sbc.c b/sbc/sbc.c
> index e2e7c61..a33ed57 100644
> --- a/sbc/sbc.c
> +++ b/sbc/sbc.c
> @@ -985,7 +985,7 @@ int sbc_decode(sbc_t *sbc, void *input, int input_len, void *output,
> char *ptr;
> int i, ch, framelen, samples;
>
> - if (!sbc && !input)
> + if (!sbc || !input)
> return -EIO;
>
> priv = sbc->priv;
> @@ -1053,7 +1053,7 @@ int sbc_encode(sbc_t *sbc, void *input, int input_len, void *output,
> const uint8_t *pcm, int16_t X[2][SBC_X_BUFFER_SIZE],
> int nsamples, int nchannels);
>
> - if (!sbc && !input)
> + if (!sbc || !input)
> return -EIO;
>
> priv = sbc->priv;
This one's now also pushed upstream.
Johan
prev parent reply other threads:[~2009-02-17 21:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-17 20:46 [PATCH] sbc: don't dereference sbc pointer if NULL marcandre.lureau
2009-02-17 21: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=20090217215906.GB10933@jh-x301 \
--to=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marc-andre.lureau@nokia.com \
--cc=marcandre.lureau@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