All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] drivers: remoteproc: rproc-uclass: Fix check for NULL pointers
Date: Sun, 6 Dec 2015 17:07:38 -0500	[thread overview]
Message-ID: <20151206220738.GU9551@bill-the-cat> (raw)
In-Reply-To: <1448942758-20424-1-git-send-email-nm@ti.com>

On Mon, Nov 30, 2015 at 10:05:58PM -0600, Nishanth Menon wrote:

> Neither uc_pdata->name nor check_name are supposed to be NULL in
> _rproc_name_is_unique(). if uc_pdata->name is NULL, we are not
> intialized yet, however if check_data is NULL, we do not have
> proper data. Further, if either were NULL, strlen will crap out
> while attempting to derefence NULL.
> 
> Instead, just check if either of these are NULL and bail out.
> 
> This should also fix the following coverity scan warnings:
> *** CID 132281:  Null pointer dereferences  (FORWARD_NULL)
> /drivers/remoteproc/rproc-uclass.c: 73 in _rproc_name_is_unique()
> 
> Reported-by: Tom Rini <trini@konsulko.com>
> Signed-off-by: Nishanth Menon <nm@ti.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151206/76332585/attachment.sig>

      reply	other threads:[~2015-12-06 22:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-01  4:05 [U-Boot] [PATCH] drivers: remoteproc: rproc-uclass: Fix check for NULL pointers Nishanth Menon
2015-12-06 22:07 ` Tom Rini [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=20151206220738.GU9551@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.